Skip to content

Question about the rating field #520

Discussion options

You must be logged in to vote

Hello!

So this is an interesting one. First of all, the ItemKey variant you're looking for is ItemKey::Popularimeter, which maps to "RATING" for Vorbis Comments. When a VorbisComments tag gets converted to a Tag, all of its keys will be translated to an ItemKey. So, when you initially write your custom ItemKey::Unknown("RATING"), it will get written to the tag normally, but be re-read as ItemKey::Popularimeter not ItemKey::Unknown("RATING"), these are two different things. Tag::insert{_unchecked} will check if the ItemKey matches an existing one in the tag, and since those two are different, you'll always fail that comparison and instead append an additional item to the Tag.

In your case,…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@UnknownSuperficialNight
Comment options

@Serial-ATA
Comment options

Answer selected by UnknownSuperficialNight
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants