| Summary: | there are recommand songs twice or more often | ||
|---|---|---|---|
| Product: | [Applications] amarok | Reporter: | Haeber <thomas> |
| Component: | general | Assignee: | Amarok Bugs <amarok-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 1.4.0 | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | A Screenshot a amaroK 1.4 where a recommanded song listed twice | ||
|
Description
Haeber
2006-06-19 02:18:57 UTC
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() )
{
|