mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 09:34:53 +02:00
make top 10 really top 10 instead of top 50
This commit is contained in:
@@ -448,10 +448,15 @@ DropJob::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVar
|
|||||||
qDebug() << "Got requestData response for artist" << artist << output;
|
qDebug() << "Got requestData response for artist" << artist << output;
|
||||||
|
|
||||||
QList< query_ptr > results;
|
QList< query_ptr > results;
|
||||||
|
|
||||||
|
int i = 0;
|
||||||
foreach ( const QVariant& title, output.toMap().value( "tracks" ).toList() )
|
foreach ( const QVariant& title, output.toMap().value( "tracks" ).toList() )
|
||||||
{
|
{
|
||||||
qDebug() << "got title" << title;
|
qDebug() << "got title" << title;
|
||||||
results << Query::get( artist, title.toString(), QString(), uuid() );
|
results << Query::get( artist, title.toString(), QString(), uuid() );
|
||||||
|
|
||||||
|
if ( ++i == 10 ) // Only getting top ten for now. Would make sense to make it configurable
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
onTracksAdded( results );
|
onTracksAdded( results );
|
||||||
|
Reference in New Issue
Block a user