Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: POPM Support? (Read 6497 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

POPM Support?

Rating of tracks is considered absolutely unnecessary by some people, others are making use of it frequently, myself being one of the latter.

While it has been implemented in a couple of players/collection managers in different ways, when it comes to actually writing the rating to the file, complying with the POPM-frame would be the way to go.

Is this actually being implemented, or are there reasons for not doing it?
cheers JD

POPM Support?

Reply #1
Not every corner of the ID3v2 spec is written by fb2k's tag writer.
I know of at least 3 different programs that interpret that particular frame in different manners (since no user actually wants to rate anything on a scale of 0-255)--which is pretty much a great reason not to support it at all, since different users would want to to work differently to be compatible with their different programs.

Furthermore, within fb2k, writing rating to a file's tag isn't something that would happen very often because when using the Playback Statistics component a rating datum is stored in an internal database, like other user-specific data.
elevatorladylevitateme

POPM Support?

Reply #2
I know about the 8bit-resolution; I just take a wild guess and say someone just wanted to be smart and go: "Hey, if there are multiple raters allowed we need a finer resolution in the application to display the average rating anyway", which brings us to the more delicate question: "Why on earth on would someone need more than one rating (but there are reasons for some of us, so let them have it... )"?

However this should not be a reason for not implementing this part of the ID3-specification as it does not necessarily mean defining a mapping scheme. In fact I would be very happy to define my own one (to comply with other players), and would consider it absolutely sufficient to just have the frame-writing and reading implemented.

The reason I want the rating in the files is that:
Changing the Name and Tag (and maybe also the path?) (which I do from time to time, and I believe, I am not the only one) will render the database entry quite useless I guess.

Also, I rate the tracks of new Albums on my portable-player and when it comes to tagging some applications seem to discard unknown tags / do not interpret freetext correctly.

Cheers JD

POPM Support?

Reply #3
For convenience, I'll quote my post from an old topic on the POPM frame, as written by Windows Explorer in Windows 7.

It writes a POPM "Popularimeter" frame, with rating values of 0x01, 0x40, 0x80, 0xC4, and 0xFF for 1-5 stars. It also writes "Windows Media Player 9 Series" to the e-mail address field.

It seems to translate ranges to stars as follows:

0x00 - no stars
0x01 - 0x1F - 1 star
0x20 - 0x5F - 2 stars
0x60 - 0x9F - 3 stars
0xA0 - 0xDF - 4 stars
0xE0 - 0xFF - 5 stars

Editing the rating also seems to zero the frame's play count field, rendering it useless.

POPM Support?

Reply #4
thanks kode54... so in my opinion, it would would do good to implement it. Problem is: I don't (yet) know anyone around here, so to whom may I suggest this (developer)?

Cheers, JD

POPM Support?

Reply #5
Hmm, since nobody is taking the lead, I think I will implement it myself. Point is: I have never written a foobar plugin, so to start, I need some information:

1. Are there any hooks to extend the tag writer / tag reader, or will I have to reopen the file and parse it myself again?
1a. Is this even possible to do?
2. Is there seriously nobody who would drop in support for this frame besides all the other parsing methods, as a plugin is clearly not the way to implement this.

Cheers, JD

POPM Support?

Reply #6
I believe the main reason for not simply adding support for POPM (and others) is that this ID3v2 frame is not a simple text value, it has complex inner structure.

foobar2000 internally takes all metadata fields as just "name: value" string pairs, optionally with multiple values. All the components using the tags don't care about their contents during modifications, don't know about any inter-field relationships and anything like that.

If the ID3 tag reader would support this frame, it would have to be expanded to fields like POPULARITY_joe@example.com (160), PLAY_COUNT_joe@example.com (7), PLAY_COUNT_rick@example.com and so on. The writer would need to be even more sophisticated, combining the fields, validating and converting them (e.g. popularity from string to number in range <0, 255>). The tag update API doesn't provide methods for telling the component that the supplied values are not valid either, IIRC. So what about errors and out of range values? Should it blindly truncate or clip them?

For these reasons, the ID3v2 frames which are more complex than simple text values are (mostly? I'm not sure if there is not some workaround for some of them) ignored and not supported.
Full-quoting makes you scroll past the same junk over and over.

POPM Support?

Reply #7
I agree with you, ID3-frames are a world of their own. However I (just) guess POPM is not the only "special" frame, so there could be a simple routine for checking of illegal entrys. Interdependencies can be quite a mess and I would really like to avoid going into this though...

One method would be to configure the "user" in foobar, any other POPM-frame that does not match the username "joe@example.com" will be either

1. ignored
2. truncated from the file (on next tag'update) as an option

This is possible since multiple POPM-frames can coexist happily. On the frontend the POPM frame is simply split into "rating", "playcount" et al. There could be a separate abstraction for "rating_others","playcount_others" et al. that summarizes the ratings of other users and if written to is obviously ignored.


If no username is set, the feature could simply be

1. unavailable (not so nice, as other things could start to rely on it)
1a. or the user's dummy fields are empty (which I like)
2. or the user is foo@b.ar (which I personally don't like)
3. or the user's "playcount" and "playcount_others" show the same (which I somehow like, but can see, that it might be a little confusing)

If no POPM-frames are found, the POPM-frame is written to the file, when the tags are saved.
Cheers, JD



POPM Support?

Reply #8
Also, supporting POPM's play count field would be a bad idea. Possibly the most prolific POPM writing tagger, Windows Explorer and Windows Media Player, resets the play count field to 0 every time it changes the file rating. And also changes the e-mail address field to indicate that it was tagged with WMP.