Help - Search - Members - Calendar
Full Version: MediaMonkey Ratings
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Support - (fb2k)
Sammy20
In mediamonkey it saves the rating to the POPULARIMETER tag. The ratings go like this:

no@email|104|0 = 2 star rating
no@email|129|0 = 2.5
no@email|154|0 = 3
no@email|179|0 = 3.5
no@email|205|0 = 4
no@email|230|0 = 4.5
no@email|255|0 = 5

Could someone write up a bit of code for me so I can have these ratings displayed as a coloumn in foobar?

That would be so great.
dano
Sammy20, foobar doesn't support that tag.
or do you see it with right click > properties
kalmark
Foobar (with APEv2 or ID3v2 tags in mp3) supports any mumbo-jumbo tag you can come up with (okay, maybe not anything, but POPULARIMETER can certainly be added).
Of course some parsing would be needed to convert it's content to something visually pleasing on display.
Synthetic Soul
CODE
$select($div($substr(%POPULARIMETER%, $add($strchr(%POPULARIMETER%,|),1), $sub($strrchr(%POPULARIMETER%,|),1)),25),0.5,1,1.5,2,2.5,3,3.5,4,4.5,5)

You could swap the items in the $select() statement to use "images" if you want, e.g.:

CODE
$select($div($substr(%POPULARIMETER%, $add($strchr(%POPULARIMETER%,|),1), $sub($strrchr(%POPULARIMETER%,|),1)),25),-,=,=-,==,==-,===,===-,====,====-,=====)

Also, if you are happy with ratings out of 10 instead of 5 then you could just use:

CODE
$div($substr(%POPULARIMETER%, $add($strchr(%POPULARIMETER%,|),1), $sub($strrchr(%POPULARIMETER%,|),1)),25)

Edit: OK, a couple of other suggestions. If you're happy with just integer representations then you could use:

CODE
$select($div($substr(%POPULARIMETER%, $add($strchr(%POPULARIMETER%,|),1), $sub($strrchr(%POPULARIMETER%,|),1)), 50),*,**,***,****,*****)

or:

CODE
$div($substr(%POPULARIMETER%, $add($strchr(%POPULARIMETER%,|),1), $sub($strrchr(%POPULARIMETER%,|),1)), 50)

(notice the use of 50 rather than 25 to get 1-5, not 2-10)
Sammy20
Foobar isn't reading the POPULARIMETER tag for me. I've got version 0.83, with the ID3v2 plugin, database enabled.

Synthetic Soul: Thanks so much for the detailed codes. I like this one the best:

CODE
$div($substr(%POPULARIMETER%, $add($strchr(%POPULARIMETER%,|),1), $sub($strrchr(%POPULARIMETER%,|),1)),25)


I tested it in Mp3tag 2.35, and it came out great.


I also clicked on properties of the my files (in foobar), and it shows every single tag I've got on it, except the POPULARIMETER tag. I know for sure it's there, since it's displaying in mp3tag.
Synthetic Soul
I see from the MP3Tag changelog that the ID3v2 frame POPM is used.

I searched HA and found a few posts regarding this field. One post said that it is only supposed to hold a value between 1 and 255 (which is wrong according to the spec), and many mention it in regard to the %RATING% tag.

I don't really know what any of this means though... smile.gif

Is it possible that the tag name is showing in foobar as "POPM", or even "RATING"?

I don't understand the ID3v2 frame IDs , or how they are mapped to tag names like ARTIST, ALBUM, and POPULARIMETER, at all.
Florian
foobar2000 doesn't support the POPM ID3v2 frame (which is used by Mp3tag and MediaMonkey).

You can add a RATING field through Mp3tag or foobar2000's masstagger, but this will be stored as custom TXXX ID3v2 frame, which isn't supported by MediaMonkey.

Best regards,
~ Florian
Synthetic Soul
Thanks for the info Ganymed.

So, if someone implements ID3v2 reading/writing they have to specifically cater for certain frames, rather than just deal with what's there, as I presume APEv2 processing does?

Edit: Also, if a user creates a POPULARIMETER tag in foobar what frame id do you think it will use instead? I don't suppose the answer will mean much to me, but I'm intrigued that setting a tag in one app can achieve a different result than another. blink.gif

Maybe I'm finally finding out why ID3v2 sucks, as everyone else seems to think...
Florian
QUOTE(Synthetic Soul @ Feb 1 2006, 07:42 PM)
So, if someone implements ID3v2 reading/writing they have to specifically cater for certain frames, rather than just deal with what's there, as I presume APEv2 processing does?

Yes, exactly. That's because APEv2 are simple key-value pairs where some ID3v2 tag frames are a little bit more complex.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.