Version: 2.2.0 (using KDE 4.3.1) Compiler: gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC) OS: Linux Installed from: Fedora RPMs Amarok 2 uses a float to code the rating, but the dbus method GetMetadata() gives an integer. So, we loose the information about half-stars when we use dbus to get the rating. Why not use the same notation as in amarok 1.4, i.e. 0 <= rating <= 10 ?
true, I can confirm this. Not sure how to CC for this.
I had a short look into this. internally Amarok is using the 0 <= rating <= 10 version of storing the rating. But trough dbus it tries to export the rating trough a float value which obviously dbus doesn't like and converts it to an int. et voilà you got a rounded value. There a two possibilities as far as I see it. Output the 0 <= rating <= 10 version or output the rating in a way that dbus likes.
Rating is in the collection, I subscribe both Jeff and Max, let the developers decide :)
It's an easy fix. Not sure if it breaks other stuff, though. Please check, I am not committing this. diff --git a/src/meta/MetaUtility.cpp b/src/meta/MetaUtility.cpp index 5d1bcf2..e6e2d67 100644 --- a/src/meta/MetaUtility.cpp +++ b/src/meta/MetaUtility.cpp @@ -127,7 +127,7 @@ Meta::Field::mprisMapFromTrack( const Meta::TrackPtr track ) map["genre"] = track->genre()->name(); map["comment"] = track->comment(); - map["rating"] = track->rating()/2; //out of 5, not 10. + map["rating"] = track->rating() / 2.0; // out of 5, not 10. Return float (bug 211777). if( track->year() ) map["year"] = track->year()->name();
So, is there anybody who wants to test that fix?
*** Bug 257609 has been marked as a duplicate of this bug. ***
Actually a WONTFIX, MPRIS standard tells us to use integer values. See: http://xmms2.org/wiki/MPRIS_Metadata#.22rating.22 "rating" (uint32) A "taste" rate value, out of 5. 0-5 or 1-5? Hint: You might want to use MPRIS v2.0 which uses the [0.0-1.0] range.
(In reply to comment #7) > Actually a WONTFIX, MPRIS standard tells us to use integer values. > > See: http://xmms2.org/wiki/MPRIS_Metadata#.22rating.22 > > "rating" > > (uint32) A "taste" rate value, out of 5. 0-5 or 1-5? WONTFIX what? > Hint: > You might want to use MPRIS v2.0 which uses the [0.0-1.0] range. Hint for who?
WONTFIX: GetMetadata() won't return a float. We're following the MPRISv1 standard here HINT: For anyone using dbus to get ratings, please use the MPRISv2 interface.