Genre Numbers in ID3v2.4

Thomas Post post at equinux.com
Wed Mar 3 11:59:58 CET 2010


Hi,

I have some ID3v4 tags with a number as a genre. Now when the taglib parses the tag it reads the number and the getter returns the according genre from the ID3v1 genres list. But now when I write some tags (without changing the genre tag), tag lib writes the genre number to the genre tag. But just the number without brackets. The standard describes it with brackets! Effect: other softwares like iTunes just show the number and not the according genre.
Now I tried to fix that but I'm not shore if this is the right way. When reading the genre in FrameFactory::updateGenre( convert the genre numbers to the according genre name and when rendering the Genre frame convert them back to a correct genre number with brackets.
Or the other way is that I save the genre number with the brackets in the updateGenre method and only convert it to the according text in the genre getter.
An other option would be just convert the number in the beginning to the according text and save the text. But with that I would loose localized genres in some applications.

Any suggestions?

Thomas Post
-----------------------------------------------------------------------------------------------------------

equinux Aktiengesellschaft
Informationstechnologien
Kirschstraße 35
80999 München - Germany
Tel. +49-89-520465-339
Fax +49-89-520465-299
mailto:post at equinux.de
http://www.equinux.com/de
-----------------------------------------------------------------------------------------------------------
Vorstand: Till Schadde  -  Aufsichtsrat: Stefan Neuenhahn
USt-IdNr.: DE206360115  -  Sitz München  -  HRB München 129700
-----------------------------------------------------------------------------------------------------------

equinux USA, Inc.
100 Produce Ave. Suite L, South San Francisco, CA 94080 
Toll free: 1-888-equinux (1-888-3784689)
http://www.equinux.com
-----------------------------------------------------------------------------------------------------------

Stay updated what's going on at equinux
equinux Blog | equinux @ Twitter | equinux @ Facebook

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/taglib-devel/attachments/20100303/2c797baf/attachment.htm 


More information about the taglib-devel mailing list