Version: 1.4.0 (using KDE 3.5.3 Level "a" , unofficial build of SUSE ) Compiler: Target: i586-suse-linux OS: Linux (i686) release 2.6.16.13-4-default The list with recommanded songs sometimes contains songs twice or more often. This is useless. See the screenshot.
Created attachment 16690 [details] A Screenshot a amaroK 1.4 where a recommanded song listed twice
SVN commit 602114 by mkossick: don't show songs with score 0 multiple times if there are less than 10 suggested songs BUG: 129395 M +0 -25 contextbrowser.cpp --- trunk/extragear/multimedia/amarok/src/contextbrowser.cpp #602113:602114 @@ -2198,31 +2198,6 @@ qb.setLimit( 0, 10 ); values = qb.run(); - // not enough items returned, let's fill the list with score-less tracks - if ( values.count() < 10 * qb.countReturnValues() - && !CollectionDB::instance()->getDbConnectionType() == DbConnection::mysql ) - { - qb.clear(); - qb.exclusiveFilter( QueryBuilder::tabSong, QueryBuilder::tabStats, QueryBuilder::valURL ); - qb.addReturnValue( QueryBuilder::tabSong, QueryBuilder::valURL ); - qb.addReturnValue( QueryBuilder::tabSong, QueryBuilder::valTitle ); - qb.addReturnValue( QueryBuilder::tabArtist, QueryBuilder::valName ); - qb.addMatches( QueryBuilder::tabArtist, relArtists ); - qb.setOptions( QueryBuilder::optRandomize ); - qb.setLimit( 0, 10 - values.count() / 5 ); // previous query had 5 return values, so count()/5 is the number of rows - - QStringList sl; - sl = qb.run(); - for ( uint i = 0; i < sl.count(); i += qb.countReturnValues() ) - { - values << sl[i]; - values << sl[i + 1]; - values << sl[i + 2]; - values << "0"; - values << "0"; - } - } - // <Suggested Songs> if ( !values.isEmpty() ) {