Bug 134893 - personal rating in the intelligent playlist
Summary: personal rating in the intelligent playlist
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.4.3
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-30 11:33 UTC by Stulle
Modified: 2006-10-23 19:20 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stulle 2006-09-30 11:33:17 UTC
Version:           1.4.3 (using KDE 3.5.4 Level "a" , unofficial build of SUSE )
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.16.13-4-default

I like to hear my loved songs from artist which I rated by stars but I get just the songs which I heard most time when I try to load it from the intelligent playlist.
Comment 1 Peter C. Ndikuwera 2006-10-03 12:05:22 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() );
Comment 2 Martin Aumueller 2006-10-23 19:20:26 UTC
*** Bug 136052 has been marked as a duplicate of this bug. ***