Work around the fact that iTunes can't properly parse ID3v2.4 numerical genres.

git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@689932 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
Scott Wheeler 2007-07-19 15:20:10 +00:00
parent cd0f0b0086
commit cf1acebc99

View File

@ -219,12 +219,23 @@ void ID3v2::Tag::setGenre(const String &s)
return;
}
// iTunes can't handle correctly encoded ID3v2.4 numerical genres. Just use
// strings until iTunes sucks less.
#ifdef NO_ITUNES_HACKS
int index = ID3v1::genreIndex(s);
if(index != 255)
setTextFrame("TCON", String::number(index));
else
setTextFrame("TCON", s);
#else
setTextFrame("TCON", s);
#endif
}
void ID3v2::Tag::setYear(uint i)