Genre is written as a number in ID3v2.4

Julio César Carrascal Urquijo jcarrascal at
Tue Feb 12 05:57:27 CET 2008


In an mp3 file with ID3v2.4 tags the genre is written as one of the
ID3v1 standard genre numbers. I've traced this problem to the
following method:

// taglib-1.4\taglib\mpeg\id3v2\id3v2tag.cpp, line 237.
void ID3v2::Tag::setGenre(const String &s)
  if(s.isEmpty()) {

  int index = ID3v1::genreIndex(s);

  if(index != 255)
    setTextFrame("TCON", String::number(index));
    setTextFrame("TCON", s);

I'd like to know if this is the intended behavior since most players
and editors, when reading an ID3v2 tag, expect a string describing the
genre instead of the number.


Julio César Carrascal Urquijo
Microsoft Certified Technology Specialist

More information about the taglib-devel mailing list