FLAC Tag Song Rating Issue
#1
Question 
Hello,

Version: XBMC for XBOX (SVN_2009-06-27_rev21142)
Mediamonkey 3.1

I use mediamonkey and occassionally mp3tag to organise my music. My music is mainly in FLAC format, however, there are a few mp3 albums as well.

To get my library nice and clean, I removed all tag information from all tracks using mp3tag (so starting with a blank slate) and then syncronised all tags with mediamonkey 3.1. (so ID3 for mp3 and FLAC for FLAC).

I rate tracks in mediamonkey on my PC. These ratings for the FLAC files are not showing up in XBMC in either a freshly scanned library or in non library mode. They do however for the mp3s.

I cleared my mediamonkey library and rescanned my music, and all the song ratings appear - showing they must be stored in the tag somewhere, so I'm wondering what to do about reading the FLAC tags song rating.

Any help would be appreciated.

Thanks,

Paul
Reply
#2
from the code it looks like we support the RATING field if you use vorbis comments. where do you store those ratings in the flac's?
Reply
#3
When I look in mp3tag the tags are standard FLAC tags - which I understand are the same as Vorbis Comments (according to google).

I do not know how to tell where the rating tags are stored though - I can't find a program that will show how the tags are written within the files. Can you suggest one if you know, and I will be able to post in more detail. (I haven't found a good one through google)

I assumed Mediamonkey would tag the ratings using the standard - as this is the suggested program for tagging in XBMC - and i started with a clean slate for all FLACs.

Thanks,

Paul
Reply
#4
Use foobar2000. It's the only windows program I trust to read stuff correctly.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
As suggested, I've just given foobar2000 a go, but to be honest I've never really gotten on with it - it doesn't show rating by default and i just wanted to read the tag to see what the problem is, as opposed to learn a new media player.

So what I have done is opened one of my FLAC files in notepad to read the tag, here it is:

fLaC "  W 7;
ÄBð ihïûQRn:¬zƒa2äÀš ™ reference libFLAC 1.2.1 20070917  TITLE=Breaking the Law ARTIST=Judas Priest ALBUM=British Steel (Remastered) GENRE=Heavy Metal COMMENT=  ENCODER=MediaMonkey 3.0.7 ENSEMBLE=Judas Priest TRACKNUMBER=03 DATE=1980
RATING=100 ALBUM ARTIST=Judas Priest DISCNUMBER=  DISC=
CUSTOM1=Music CUSTOM2=Studio Albums CUSTOM3= CUSTOM4=  ALBUMARTIST=Judas Priest w

It shows RATING in here, but its not in XBMC.

Also, as another test, I have just copied the same track directly (no conversion) to my SansaClip (portable media player which plays FLACS) and it displays the RATING correctly in there.

So i'm still stumped. If anyone can help or you need more info please let me know.
Reply
#6
Supply an example file. You can possibly just trim the front off it.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
Here is a link to an example file (I do not have permission to attach files here). I have edited it in audacity to make it a small file, and I have tagged it as usual using mediamonkey (FLAC tag):

http://www.megaupload.com/?d=DPI3IR6K

I have looked at the RATING in FLAC tag more, and it is a value between 0 and 100. Each 20 represents 1 star, and they are scored in units of 10 - so 60 would be a rating of 3. This is how mediamonkey 3.1 is tagging these fresh, and SansaClip also recognizes this rating system, so it doesn't seem incorrect.

Hope this helps get to the bottom of this.
Reply
#8
I have also installed the latest version of XBMC for windows - The same issue occurs with this version. I would appreciate some assistance, the example flac is in my previous post.
Reply
#9
ok, i am not a coder, but thought I would take a look anyway, as this is driving me mad.

To be honest I couldn't work out FlacTag.cpp - how it is reading the tags, although i think it is passing what it believes to be tags into the VorbisTag.cpp methods.

VorbisTag.cpp was easier for a layman to understand. If the above is the casethen this is the section that deals with ratings (from VorbisTag.cpp)

Code:
145    
146      if ( strTagType == "RATING" && strTagValue.GetLength() == 1 && strTagValue[0] > '0' && strTagValue[0] < '6')
147        tag.SetRating(strTagValue[0]);
148

Looking at the .flac example file i provided in a previous post (please download to take a look). The "RATING" tag is a value between 0 and 100. As such it does not seem to fall into the if statement logic above.

Please can someone far more knowledgable than me take a look - a lot of this is just me trying to apply common sense.

Thanks, Don
Reply
#10
There doesn't seem to be a consensus on what range should be stored in a vorbis tag from my searching on the internet.

Some use 0-5, some use 0-100. We cannot automatically assume one way or the other, thus we'd have to add a setting for it.

All you have to do to get yours working is to remove the secondary if block and replace with one that:

1. Converts the value to a number.
2. Compares this with 0...maxRating, where maxRating is set to 100 in your case.
3. Set if in this range by converting down to the 0..5 internal range.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#11
yeah, cheers jmarshall. Before I commit time learning C++, I thought I would test the hypothesis though.

So I manually replaced the value stored in the Rating tag with a value between 0 and 5. I thought this should bring up a rating in XBMC, but it didn't - still same problem. (You can try it with the example I provided to see, in fact I would like someone to take a look at it)

Also, can anyone confirm that FlacTag.cpp is what XMBC runs when it encounters a FLAC tag. And that in turn FlacTag.cpp checks the tag and sends it to the methods in VorbisTag.cpp. This will help work out where the issue is.
Reply
#12
yes, that's whats going on
Reply
#13
jmarshall Wrote:There doesn't seem to be a consensus on what range should be stored in a vorbis tag from my searching on the internet.

Some use 0-5, some use 0-100. We cannot automatically assume one way or the other, thus we'd have to add a setting for it.

All you have to do to get yours working is to remove the secondary if block and replace with one that:

1. Converts the value to a number.
2. Compares this with 0...maxRating, where maxRating is set to 100 in your case.
3. Set if in this range by converting down to the 0..5 internal range.

Cheers,
Jonathan

Looking around, you are right, there are 2 systems 0-5 and 0-100. There don't appear to be any other systems for FLAC tag ratings.

No numbers apart from 0 are used in both systems - and in both 0 equates to the same rating and 0 is skipped in that code anyway. As such, I think both can be implemented without having to provide settings for the user (which would add unnecessary complexity):

Very simply, if ratings are 6 or over, they should be divided by 20. This will convert the higher rating system down. Then the code that is there already would take the first digit and apply the star rating according to that (like it does already).

so a rating of 20 would become 1 and would be given 1 star (SetRating). a rating of 50 would become 2.5 and would therefore be given 2.

This makes sense in my mind - see any issues here? I will try to adjust the code and see how it works.
Reply
#14
That precludes a rating of 5 on the 0-100 system. i.e. it's not foolproof. While that may be a rare case, I can guarantee some fool will come up with it!

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#15
Duplicate, sorry
Reply

Logout Mark Read Team Forum Stats Members Help
FLAC Tag Song Rating Issue0