Genre Numbers in ID3v2.4

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


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
Kirschstraße 35
80999 München - Germany
Tel. +49-89-520465-339
Fax +49-89-520465-299
mailto:post at
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)

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

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the taglib-devel mailing list