]> granicus.if.org Git - taglib/commitdiff
Work around the fact that iTunes can't properly parse ID3v2.4 numerical genres.
authorScott Wheeler <wheeler@kde.org>
Thu, 19 Jul 2007 15:20:10 +0000 (15:20 +0000)
committerScott Wheeler <wheeler@kde.org>
Thu, 19 Jul 2007 15:20:10 +0000 (15:20 +0000)
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@689932 283d02a7-25f6-0310-bc7c-ecb5cbfe19da

taglib/mpeg/id3v2/id3v2tag.cpp

index 333e5f60a26ecdeab2a8c6e268de3e21120aff1b..4a3c73867e53ee7c5b15f20c905d99781def8eb6 100644 (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)