Summary: | personal rating in the intelligent playlist | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Stulle <studentenstuhl> |
Component: | general | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | jonathan.anderson |
Priority: | NOR | ||
Version: | 1.4.3 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Stulle
2006-09-30 11:33:17 UTC
SVN commit 591835 by pndiku: BUG: 134893 "Favorite tracks" default smart playlist now obeys "Use Scores" and "Use Ratings" setting. M +9 -2 playlistbrowser.cpp --- trunk/extragear/multimedia/amarok/src/playlistbrowser.cpp #591834:591835 @@ -676,6 +676,13 @@ void PlaylistBrowser::loadDefaultSmartPlaylists() { DEBUG_BLOCK + int favSortBy = QueryBuilder::valPercentage; + + if ( !AmarokConfig::useScores() && !AmarokConfig::useRatings() ) + favSortBy = QueryBuilder::valPlayCounter; + else if( !AmarokConfig::useScores() ) + favSortBy = QueryBuilder::valRating; + const QStringList genres = CollectionDB::instance()->query( "SELECT DISTINCT name FROM genre;" ); const QStringList artists = CollectionDB::instance()->artistList(); SmartPlaylist *item; @@ -695,7 +702,7 @@ item->setKept( false ); /********** Favorite Tracks **************/ qb.initSQLDrag(); - qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valPercentage, true ); + qb.sortBy( QueryBuilder::tabStats, favSortBy, true ); qb.setLimit( 0, 15 ); item = new SmartPlaylist( m_smartDefaults, item, i18n( "Favorite Tracks" ), qb.query() ); item->setKept( false ); @@ -703,7 +710,7 @@ foreach( artists ) { qb.initSQLDrag(); qb.addMatch( QueryBuilder::tabArtist, *it ); - qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valPercentage, true ); + qb.sortBy( QueryBuilder::tabStats, favSortBy, true ); qb.setLimit( 0, 15 ); last = new SmartPlaylist( item, last, i18n( "By %1" ).arg( *it ), qb.query() ); *** Bug 136052 has been marked as a duplicate of this bug. *** |