mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
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:
parent
cd0f0b0086
commit
cf1acebc99
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user