Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Robin Stocker
RE: Rating of a mp3 file [ reply ]  
2007-06-11 12:14
What rating do you want to get?

If it's the iTunes rating, then you have to extract it from the "iTunes Music Library.xml" file, because it isn't stored in the ID3 tag.

If you want the POPM frame, you can get it like this:

tag = ID3Lib::Tag.new("song.mp3")
popm = t.frame(:POPM)
rating = popm[:rating]

Does that answer your question?

By: A G
Rating of a mp3 file [ reply ]  
2007-06-11 05:49
I am a beginner on ruby and am trying to use iD3-lib. Could not figure out how to get the rating of the song. Could you specify how I could do that?