View Single Post
Old 27th November 2012, 04:42   #19
ryerman
Major Dude
 
ryerman's Avatar
 
Join Date: Mar 2010
Location: Canada
Posts: 659
Quote:
Originally Posted by DrO View Post
psuedo-code of what is going on (maybe what i've said above is not being followed as to what i mean so here you go):
PHP Code:
if (rating 10) {
    
// handles 0-100
    
rating /= 20;
}
else if (
rating 5) {
    
// handles 0-10
    
rating /= 2;
}
else {
    
// use rating as-is

-daz
The code seems to assume that the value of the rating determines which scale was used when the file was rated. But that is not true. For example; 0, 1, 2, 3, 4, and 5 are legitimate ratings in any scale with an upper limit greater than 4.

If files have been rated using the 0-10 scale, then a 4 rating would receive 2 stars. But the code assumes it must have been rated using the 0-5 scale and assigns 4 stars. This is inconsistent when assigning 3 stars to a file with a 6 rating, if both files were rated on the 0-10 scale.

How can Winamp ever know which rating scale was used for any particular file?
What happens when a user imports files that have been rated on differing scales?

I agree with MrSinatra's suggestion for reading ratings, mainly because it is very close to being the inverse of what Winamp writes.
Quote:
Originally Posted by MrSinatra View Post

i don't know how winamp reads it, but i would hope its something like this:

0 = 0 stars
1-20 = 1 star
21-40 = 2
41-60 = 3
61-80 = 4
81-100 = 5

that system basically allows for 20 points of granularity between star levels.
Users that wanted to import files with ratings based on a different scale would have to re-tag the files to attain the desired number of rating stars in Winamp.

Here's a screenshot that shows Winamp's interpretation of the Rating comment in FLAC files.
The results seem illogical.
Attached Thumbnails
Click image for larger version

Name:	Flac ratings in Winamp.GIF
Views:	108
Size:	55.5 KB
ID:	50080  

Windows 10 Home, 64 bit, Winamp 5.666, Bento Skin
ryerman is offline   Reply With Quote