Version: (using KDE KDE 3.5.5) Installed from: Ubuntu Packages I love Amarok's new manual rating system. Thank you, thank you, *thank you* for giving me the choice: automatic scoring is a great idea, but it gets messed up by things like shuffle mode and other people listening to my music. My problem is: the "Favourite Tracks by $artist" list puts the tracks in auto-score order. I have song with a rating of 5 stars that goes below songs with 2.5 stars because I was jumping around my playlist (I think the logic is "if he skipped the song, he must not like it"). So, if I'm using the rating system instead of auto-scoring, I think that my Favourite Tracks ought to be ordered by rating.
Created attachment 18209 [details] Screenshot with Rating System A screenshot of the problem. Notice that there is a 5-star song listed below a 2.5-star song.
Created attachment 18210 [details] Screenshot with Scoring System This is a screenshot with the scored turned on. Notice that: 1. Scores have been calculated, even though I don't use them (this is fine, maybe over the long term they'll become accurate and I'll start using them) 2. The order of the Favourite Tracks (which is the same in both screenshots) is determined by score.
This seems to be already fixed for 1.4.4. *** This bug has been marked as a duplicate of 134893 ***
So it does... sorry for the dupe. I did search for similar bugs, I just didn't see 134893.
Hang on a second... this *isn't* a duplicate. I tried applying the patch in #134893, and it fixes the smart playlists, but I'm talking about the list "Favourite Tracks by $artist" in the Context pane/tab/whatever. They're still ordered by score, not rating. There is similar code in contextbrowser.cpp... I'm checking to see if I can get this working.
Created attachment 18259 [details] Patch for amarok/src/contextbrowser.cpp This patch should fix everything... it's based on the patch that closed bug #134893, but this is in contextbrowser.cpp instead of playlistbrowser.cpp.
SVN commit 599121 by aoliveira: Favorite tracks would respect score/rating options as it should. Patch by Jonathan Anderson <jonathan.anderson@ieee.org> BUG: 136052 M +7 -4 contextbrowser.cpp --- trunk/extragear/multimedia/amarok/src/contextbrowser.cpp #599120:599121 @@ -2275,6 +2275,12 @@ QueryBuilder qb; QStringList values; + int favSortBy = QueryBuilder::valPercentage; + if ( !AmarokConfig::useScores() && !AmarokConfig::useRatings() ) + favSortBy = QueryBuilder::valPlayCounter; + else if( !AmarokConfig::useScores() ) + favSortBy = QueryBuilder::valRating; + qb.clear(); qb.addReturnValue( QueryBuilder::tabSong, QueryBuilder::valTitle ); qb.addReturnValue( QueryBuilder::tabSong, QueryBuilder::valURL ); @@ -2282,10 +2288,7 @@ qb.addReturnValue( QueryBuilder::tabStats, QueryBuilder::valRating ); qb.excludeFilter( QueryBuilder::tabStats, QueryBuilder::valPlayCounter, "1", QueryBuilder::modeLess ); qb.addMatch( QueryBuilder::tabSong, QueryBuilder::valArtistID, QString::number( artist_id ) ); - if( AmarokConfig::useScores() ) - qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valScore, true ); - if( AmarokConfig::useRatings() ) - qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valRating, true ); + qb.sortBy( QueryBuilder::tabStats, favSortBy, true ); qb.setLimit( 0, 10 ); values = qb.run(); usleep( 10000 );
Still not exactly what he and i want - i think it should be the other way round. If i have a rating this should be prefered over score, because i always set it actively and therefore it should be more accurate. so it would be (old style): @@ -2195,6 +2195,7 @@ qb.addReturnValue( QueryBuilder::tabStats, QueryBuilder::valScore ); qb.addReturnValue( QueryBuilder::tabStats, QueryBuilder::valRating ); qb.addMatches( QueryBuilder::tabArtist, relArtists ); + qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valRating, true ); qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valScore, true ); qb.setLimit( 0, 10 ); values = qb.run(); @@ -2274,7 +2275,9 @@ qb.addReturnValue( QueryBuilder::tabStats, QueryBuilder::valRating ); qb.excludeFilter( QueryBuilder::tabStats, QueryBuilder::valPlayCounter, "1", QueryBuilder::modeLess ); qb.addMatch( QueryBuilder::tabSong, QueryBuilder::valArtistID, QString::number( artist_id ) ); - qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valForFavoriteSorting(), true ); + // qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valForFavoriteSorting(), true ); + qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valRating, true ); + qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valScore, true ); qb.setLimit( 0, 10 ); values = qb.run(); usleep( 10000 ); or with the valForFavoriteSorting(): --- original/collectiondb.cpp 2006-10-30 21:16:01.000000000 +0100 +++ patched2/collectiondb.cpp 2006-10-30 22:33:15.000000000 +0100 @@ -7573,12 +7573,12 @@ Q_INT64 -QueryBuilder::valForFavoriteSorting() { - Q_INT64 favSortBy = valPercentage; +QueryBuilder::valForFavoriteSorting() { + Q_INT64 favSortBy = valRating; if ( !AmarokConfig::useScores() && !AmarokConfig::useRatings() ) favSortBy = valPlayCounter; - else if( !AmarokConfig::useScores() ) - favSortBy = valRating; + else if( !AmarokConfig::useRatings() ) + favSortBy = valPercentage; return favSortBy; } diff -aur original/contextbrowser.cpp patched2/contextbrowser.cpp --- original/contextbrowser.cpp 2006-10-30 21:16:01.000000000 +0100 +++ patched2/contextbrowser.cpp 2006-10-30 22:33:21.000000000 +0100 @@ -2195,6 +2195,7 @@ qb.addReturnValue( QueryBuilder::tabStats, QueryBuilder::valScore ); qb.addReturnValue( QueryBuilder::tabStats, QueryBuilder::valRating ); qb.addMatches( QueryBuilder::tabArtist, relArtists ); + qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valRating, true ); qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valScore, true ); qb.setLimit( 0, 10 ); values = qb.run();
I agree, user defined ratings should have a preference over calculated scores On 30 Oct 2006 21:35:35 -0000, simon <s7mon@web.de> wrote: [bugs.kde.org quoted mail]
I just saw that my last example is not perfect when using valForFavoriteSorting(). Because in this case sorting is only done by rating, but it would be better to use both like in: sortBy(..valRating) and sortBy(..valScore).
Just checked out svn today - while both scores and rating are used now i think the order in showSuggestedSongs is still wrong. The two lines: qb.addReturnValue( QueryBuilder::tabStats, QueryBuilder::valScore ); qb.addReturnValue( QueryBuilder::tabStats, QueryBuilder::valRating ); should be switched. That would make more sense for me. --- original/contextbrowser.cpp 2006-11-07 12:59:06.000000000 +0100 +++ patched/contextbrowser.cpp 2006-11-07 14:58:32.000000000 +0100 @@ -2190,9 +2190,9 @@ qb.clear(); qb.addReturnValue( QueryBuilder::tabSong, QueryBuilder::valURL ); qb.addReturnValue( QueryBuilder::tabSong, QueryBuilder::valTitle ); - qb.addReturnValue( QueryBuilder::tabArtist, QueryBuilder::valName ); - qb.addReturnValue( QueryBuilder::tabStats, QueryBuilder::valScore ); + qb.addReturnValue( QueryBuilder::tabArtist, QueryBuilder::valName ); qb.addReturnValue( QueryBuilder::tabStats, QueryBuilder::valRating ); + qb.addReturnValue( QueryBuilder::tabStats, QueryBuilder::valScore ); qb.addMatches( QueryBuilder::tabArtist, relArtists ); qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valScore, true ); qb.setLimit( 0, 10 );
simon, the order of that commands don't make any difference for sorting.
Yes your're right i mixed it up with the sortBy which i suggested in my previous post - sorry for the confusion. so there should be a extra qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valRating, true ); in showSuggestedSongs or the qb.sortByFavorite(); as in showArtistsFaves.
Hi. Question: Does this also address similar problems in the Statistics tab of the Track Information window? (Still at 1.4.1 here, so forgive me if that's already done.)
yes On 26 Nov 2006 00:20:17 -0000, Brendon Higgins <blhiggins@gmail.com> wrote: [bugs.kde.org quoted mail]
Just wanted to ask if someone could bring this into svn soon? I mean the sort for suggested songs?