Genre becomes a Numeric value

Manfred Schwind lists at
Wed Sep 16 09:37:05 CEST 2009

>> OK, thanks!
>> I looked into the sources and also found a solution that works for  
>> me.
>> Yes, I'm looking with iTunes at the files. First it was "Rock", after
>> rewriting the tag with taglib, it was "17".
>> After looking into the source of ID3v2::Tag::setGenre the workaround
>> was pretty easy:
>> I just do a tag->setGenre(tag->genre()); before saving now ...
>> ;-)
> Note that there are already various workarounds for iTunes bugs in
> TagLib, which can be toggled at build time. If this was indeed  
> reported
> before, it may actually have a fix in existence but just not activated
> by default.

Yes, I saw that. NO_ITUNES_HACKS must not be defined when building to  
have the iTunes workarounds.
But the problem is that taglib only sets the Genre as text ("iTunes  
hack") when explicitly calling "setGenre". If the tag is just read by  
taglib and then saved (without changing the genre), the text is  
converted from text to number. So this bug was not fixed for every  
case. As a workaround I call setGenre just before saving the tag as  
written above. Works fine for me.


More information about the taglib-devel mailing list