Add ability to cope with odd genres in mp3 output to mkogg.py.
authorW. Trevor King <wking@drexel.edu>
Tue, 16 Nov 2010 22:23:52 +0000 (17:23 -0500)
committerW. Trevor King <wking@drexel.edu>
Tue, 16 Nov 2010 22:23:52 +0000 (17:23 -0500)
posts/mkogg/mkogg.py

index dbe620d4bed0d41c23fd509527966cc8fb238830..dd8c9f656008608402b8f6a09db3dfdc4ed1e1a6 100755 (executable)
@@ -373,7 +373,8 @@ class Converter (object):
                     num,name = [x.strip() for x in line.split(':', 1)]
                     genres[name.lower()] = num
                 self._id3v1_genres = genres
-            num = self._id3v1_genres[genre.lower()]
+            # Genre 12 = "Other"
+            num = self._id3v1_genres.get(genre.lower(), '12')
             args.extend(['--genre', num])
         if 'tracknumber' in metadata:
             track = metadata['tracknumber']