mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 15:59:42 +01:00
Don't crash if Rovi returns no results
This commit is contained in:
parent
5eef57f3b8
commit
7549d73115
@ -149,7 +149,13 @@ RoviPlugin::albumLookupFinished()
|
||||
return;
|
||||
}
|
||||
|
||||
QVariantMap results = response[ "searchResponse" ].toMap().value( "results" ).toList().first().toMap();
|
||||
QVariantList resultList = response[ "searchResponse" ].toMap().value( "results" ).toList();
|
||||
if ( resultList.size() == 0 )
|
||||
{
|
||||
emit info( requestData, QVariant() );
|
||||
}
|
||||
|
||||
QVariantMap results = resultList.first().toMap();
|
||||
QVariantList tracks = results[ "album" ].toMap()[ "tracks" ].toList();
|
||||
|
||||
if ( tracks.isEmpty() )
|
||||
|
Loading…
x
Reference in New Issue
Block a user