Bug 148916 - Smart Playlist does not load tracks with a rating >= 4.5
Summary: Smart Playlist does not load tracks with a rating >= 4.5
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.4.7
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
: 150345 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-08-17 03:09 UTC by Amos Kariuki
Modified: 2007-10-01 17:01 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 Amos Kariuki 2007-08-17 03:09:12 UTC
Version:           1.4.7 (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

If I create a "Smart Playlist" and set a condition to "Match All of the following conditions" where "Rating is 5.0", no songs are displayed when I load the playlist.

When I re-open/edit the previously created Playlist, the "Rating" setting is set to "Not Rated".

If I however set the "Rating" option to "is 4.5", all the 5.0 rated songs are loaded (I only have unrated or 5.0 rated songs).
Comment 1 Maximilian Kossick 2007-09-03 14:08:02 UTC
SVN commit 707941 by mkossick:

fixed off-by-one error
BUG:148916


 M  +2 -4      smartplaylisteditor.h  


--- branches/stable/extragear/multimedia/amarok/src/smartplaylisteditor.h #707940:707941
@@ -133,16 +133,14 @@
 inline int
 CriteriaEditor::indexToRating( int index )
 {
-    if ( index <= 9 && index >= 1 ) return index + 1;
-    if ( index == 0 ) return index;
+    if ( index <= 10 && index >= 0 ) return index;
     return -1;
 }
 
 inline int
 CriteriaEditor::ratingToIndex( int rating )
 {
-    if ( rating <= 10 && rating >= 2 ) return rating - 1;
-    if ( rating == 0 ) return rating;
+    if ( rating <= 10 && rating >= 0 ) return rating;
     return -1;
 }
 
Comment 2 Maximilian Kossick 2007-10-01 17:01:45 UTC
*** Bug 150345 has been marked as a duplicate of this bug. ***