From 559433162f26b3237ccbede24e4ff2fdfa21fb9b Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Mon, 22 Aug 2011 21:08:23 +0200 Subject: [PATCH] make top 10 really top 10 instead of top 50 --- src/libtomahawk/dropjob.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libtomahawk/dropjob.cpp b/src/libtomahawk/dropjob.cpp index 95af9f038..76c5eecd0 100644 --- a/src/libtomahawk/dropjob.cpp +++ b/src/libtomahawk/dropjob.cpp @@ -448,10 +448,15 @@ DropJob::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVar qDebug() << "Got requestData response for artist" << artist << output; QList< query_ptr > results; + + int i = 0; foreach ( const QVariant& title, output.toMap().value( "tracks" ).toList() ) { qDebug() << "got title" << title; 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 );