mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Treemodel: don't consider an infosystem request resolved if it has invalid data returned
This commit is contained in:
@@ -827,7 +827,7 @@ TreeModel::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QV
|
|||||||
QStringList albums = returnedData[ "albums" ].toStringList();
|
QStringList albums = returnedData[ "albums" ].toStringList();
|
||||||
QList<album_ptr> al;
|
QList<album_ptr> al;
|
||||||
|
|
||||||
InfoSystem::InfoStringHash inputInfo;
|
Tomahawk::InfoSystem::InfoStringHash inputInfo;
|
||||||
inputInfo = requestData.input.value< InfoSystem::InfoStringHash >();
|
inputInfo = requestData.input.value< InfoSystem::InfoStringHash >();
|
||||||
artist_ptr artist = Artist::get( inputInfo[ "artist" ], false );
|
artist_ptr artist = Artist::get( inputInfo[ "artist" ], false );
|
||||||
|
|
||||||
@@ -848,14 +848,19 @@ TreeModel::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QV
|
|||||||
{
|
{
|
||||||
if ( m_receivedInfoData.contains( requestData.input.value< Tomahawk::InfoSystem::InfoStringHash >() ) )
|
if ( m_receivedInfoData.contains( requestData.input.value< Tomahawk::InfoSystem::InfoStringHash >() ) )
|
||||||
break;
|
break;
|
||||||
m_receivedInfoData.insert( requestData.input.value< Tomahawk::InfoSystem::InfoStringHash >() );
|
|
||||||
|
|
||||||
QVariantMap returnedData = output.value< QVariantMap >();
|
QVariantMap returnedData = output.value< QVariantMap >();
|
||||||
|
if ( returnedData.isEmpty() )
|
||||||
|
break;
|
||||||
|
|
||||||
|
m_receivedInfoData.insert( requestData.input.value< Tomahawk::InfoSystem::InfoStringHash >() );
|
||||||
|
|
||||||
|
|
||||||
QStringList tracks = returnedData[ "tracks" ].toStringList();
|
QStringList tracks = returnedData[ "tracks" ].toStringList();
|
||||||
QList<query_ptr> ql;
|
QList<query_ptr> ql;
|
||||||
|
|
||||||
InfoSystem::InfoStringHash inputInfo;
|
Tomahawk::InfoSystem::InfoStringHash inputInfo;
|
||||||
inputInfo = requestData.input.value< InfoSystem::InfoStringHash >();
|
inputInfo = requestData.input.value< Tomahawk::InfoSystem::InfoStringHash >();
|
||||||
|
|
||||||
foreach ( const QString& trackName, tracks )
|
foreach ( const QString& trackName, tracks )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user