Kodi Community Forum

Full Version: 5-step rating not read from .flac
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Rather than opening an issue on github which is getting kind of cluttered, I thought I'd bring this up here first. @DaveBlake You recently fixed the rating in regards to musicbrainz. Now it correctly interprets ratings which are set in both 5 steps and in 10 steps properly. This is great! However, rating tags only seem to read from MP3 and subsequently shown in "Now Playing". I have tagged my MP3 with ID3v2.4 and APEv2 tags. Both types seem to work and the rating is read from them.

Kodi doesn't seem to be able to read the rating tag from my .flac files which have VORBIS tags, though. I've prepared a sample file and will send you a link via PM, just to make sure there's nothing peculiar about my tags. If you have time I'd be grateful if you could check it out. Thanks in advance!
I think flac is a scale of 1-100 which is /10 to get the userrating?

scott s.
I have no idea. The files were all tagged with foobar2000 and that just uses numbers 1-5.


At first glance I see no specs for RATING at https://www.xiph.org/vorbis/doc/v-comment.html
It looks like the original specs for Vorbis Comment I consisted of 15 fields. There was a later proposal to add another 8 fields. RATING is not among any them.

For simplicities' sake I suggest to treat this tag the same way it is done for ID3v2 and APE.
Here's how it is in TagLoaderTagLib.cpp:
else if (it->first == "RATING")
// Vorbis ratings are a mess because the standard forgot to mention anything about them.
// If you want to see how emotive the issue is and the varying standards, check here:
// http://forums.winamp.com/showthread.php?t=324512
// The most common standard in that thread seems to be a 0-100 scale for 1-5 stars.
// So, that's what we'll support for now.
int iUserrating = it->second.front().toInt();
if (iUserrating > 0 && iUserrating <= 100)
tag.SetUserrating((iUserrating / 10));

I think if you do some searching on the forum there's been threads about flac ratings.

scott s.
RATING in Vorbis tags format (FLAC files) is taken as out of 100 as the code comment says.

Thanks for raising it here on the forum rather than on GitHub. Far more people have access to the forum and could be able to answer you that have Github accounts and look at issues. It is therefore better to start with questions here first rather than rush to report a bug on GitHub.
It's an unfortunate situation. Those discussions are 8 years old and some programmers went with the 100 scale because they believed it would be the most future-proof. I can understand it from a desire to support community ratings. Discogs uses community ratings with such fractions but has introduced its own tag to circumvent the issue. The thing is both scales 1-5 and 1-10 work in KODI when being read back from ID3v2 and APE although that scheme is supposedly based on the 1-255 scale.

There has been a lot of evolution since back then. From my point of view, the rating scale 1-10 is the most common now. Also, KODI has made a decision to use musicbrainz tags as the most important way to describe files in the library. Going from that it would be most logical to support the musicbrainz rating style across all file types. It certainly seems to work for ID3v2 and APE tags.

Overrding the internal steps via advancedsettings.xml could be an alternative, like so:

<vorbisratingsteps>10</vorbisratingsteps> ;accepted values are 5, 10, 100, 255


On a personal note, I find a 5-step-rating the easiest to follow:

3=indifferent/avg/unmemorable/no strong feelings or impressions either way

I also rate movies on IMDB which uses a 10-step-scale. There I find myself using mostly ratings from 3-9 because I have no clear personal concept of the intermediate half-steps and additionally sometimes wanting to mitigate obvious sponsored or biased ratings.