]> diplodocus.org Git - flac-archive/commitdiff
(flac2mp3): Never set date to 'unknown'.
authorepg <>
Mon, 26 Mar 2007 01:07:24 +0000 (01:07 +0000)
committerepg <>
Mon, 26 Mar 2007 01:07:24 +0000 (01:07 +0000)
(Tags.set): Need to upcase the key when setting, too.

flac2mp3

index 982a0120dbdd37832a3c1dd521e946e6b63aac52..999fd66d6fe92b87225f67655c1d33c2f8f3afd1 100755 (executable)
--- a/flac2mp3
+++ b/flac2mp3
@@ -62,8 +62,11 @@ from org.diplodocus.util import run_or_die
 # The child processes
 
 def flac2mp3(fn, title, artist, album, date, track, skip_until, pics=None):
 # The child processes
 
 def flac2mp3(fn, title, artist, album, date, track, skip_until, pics=None):
-    (title, artist, album, date) = [(x == None and 'unknown') or x
-                                    for x in (title, artist, album, date)]
+    (title, artist, album) = [(x == None and 'unknown') or x
+                              for x in (title, artist, album)]
+    if date == None:
+        date = ''
+
     try:
         (skip_arg, until_arg) = skip_until
     except ValueError:
     try:
         (skip_arg, until_arg) = skip_until
     except ValueError:
@@ -172,6 +175,7 @@ class Tags(object):
             return None
         return '\n'.join(value)
     def set(self, key, value, track=None):
             return None
         return '\n'.join(value)
     def set(self, key, value, track=None):
+        key = key.upper()
         if track not in self._tags:
             self._tags[track] = {}
         if key not in self._tags[track]:
         if track not in self._tags:
             self._tags[track] = {}
         if key not in self._tags[track]: