You are here: Home » Topic » svn-1696 problems with id3v2 ratings?

svn-1696 problems with id3v2 ratings?

This topic contains 10 replies, has 4 voices, and was last updated by  Anonymous 9 years, 1 month ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
  • #2810


    I just tagged and voted a lot of my music library using Songbird. Nice way to do this if you ask me, you just need to enable ratings to metadata in about:config πŸ˜‰
    Anywho, I realized that my smart playlists don’t reflect the ratings, even after doing a rescan.

    So I checked the mp3s with mp3tag, and the rating tag is there and with the values that I specify – 70 for instance. In firefly’s database the same song shows up with a rating of 20 however. Even when I rate the song to 100, it still shows up with 20 in firefly.

    I know for a fact that the ratings have worked fine with an earlier nightly on the slug, I’m using the svn-1696 debian binary now.
    Has anyone else noticed this as well?



    i use the 1696 on my slug. rating is done with t4roku. everything works fine.



    Well if you inject ratings into the DB I’m certain everything is fine πŸ˜‰
    I want to store the ratings in the files themselves, so they persist.

    Anyway the only file with a half-decent rating from my firefly library has weird id3-tags:

    POPM (Popularimeter): Windows Media Player 9 Series, counter=0 rating=255TPE1 (Lead performer(s)/Soloist(s)): Original Soundtrack

    It’S weird because mp3tag nor songbird are picking the rating up. Only firefly. I am beginning to want to dive into the metadata code of firefly and find out what’s cooking….. πŸ™„ 😈



    What i found after a long time of searching:

    firefly smart playlists do (only?) respond to the mp3-tag %POPULARIMETER% .
    This tag can be added by the software MP3TAG.exe (e.g.version 2.42)

    And u must know:
    – you type in one of those values: 1 or 64 or 128 or 196 or 255
    – alternatively you can type in * or ** or *** or **** or ***** which will be translated in those above values by MP3TAG automatically.
    – Firefly then recognizes that values as 20 or 40 or 60 or 80 or 100.
    So in a smart playlist you can e.g use: rating >= 80 which returns the songs with ***** or **** respectively 255 or 196.

    Unfortunately i haven’t yet found out to have that mp3-tag popularimeter show up in FOOBAR2000 !



    Wow – you beat me to it πŸ˜‰
    I’ve just found the corresponding source lines in scan-mp3.c – line ~466

    It’s reading the POPM alright, but the decoding seems to be specific to iTunes.
    Songbird translates one star to 30, two stars to 50, etc.
    And the ratings are being written decimal.

    However, when firefly reads a song with 5 stars (90) from songbird for instance, it’s being translated to 40.

    466 	        if((!strcmp(pid3frame->id,"POPM")) && (pid3frame->nfields == 3)) {
    467 rating = id3_field_getint(&pid3frame->fields[1]);
    468 if(rating >= 0x01)
    469 pmp3->rating = 20;
    470 if(rating >= 0x40)
    471 pmp3->rating = 40;
    472 if(rating >= 0x80)
    473 pmp3->rating = 60;
    474 if(rating >= 0xC4)
    475 pmp3->rating = 80;
    476 if(rating >= 0xFF)
    477 pmp3->rating = 100;

    Which effectively breaks songbird’s ratings into firefly. I’ll patch my firefly and let you know.

    Commenting the above ifs out and replacing it with this:

    pmp3->rating = rating; 

    does the trick.

    Bear in mind that I don’t use iTunes though, so YMMV.



    Instead of songbird u can use MP3tag.exe and leave firefly unpatched. Works really fine for sure!

    But unfortunately in both cases u need the pc to rate!



    Yes, that works about as well as access can be considered a database: When you only have 1 user and not more than 7 rows of data πŸ˜‰ (read: no more than 7 songs)

    In all seriousness: I’m psyched for the next release of Banshee which will feature this too. Depending on which rating schemes it’ll use, probably a patch for firefly will be in order. Songbird uses taglib to write the rating metadata, and that’s not without errors as well. Why this is interesting? Because taglib is also the candidate to be used from firefly itself to write metadata back to files. So any bugs that songbird catches we won’t have to worry about for firefly, some day. πŸ˜‰



    I would like to know how u manage to patch firefly?



    By downloading the source code, having all the neccessary libraries installed in your system in the first place and then just changing the appropriate lines in the source code and recompiling.

    So no, this wont work for any binary distributions. You can only patch when you can compile the source on your system.



    As a little sidenote here:
    While it’s comfy to edit ratings and metadata through songbird, it’s by no means “stable”.
    It doesn’t work on all files, and also sometimes eats metadata.

    So let’s wait and see how Banshee does that. (That and root for a win32 port :D)



    Thanks for the information so far.

    My (stable) way of doing the rating right now is

    -find the file (pretty quickly) with foobar
    -right click to open the appropriate folder
    -right click to open just that file in mp3tag
    -edit the tag

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.