]> diplodocus.org Git - flac-archive/blobdiff - flac2mp3
todo
[flac-archive] / flac2mp3
index aa00fff..b7a5a21 100755 (executable)
--- a/flac2mp3
+++ b/flac2mp3
@@ -112,7 +112,7 @@ def flac2mp3(fn, title, artist, album_artist, album, discnum, date,
     pic_options = ''
     (fd, picfn) = tempfile.mkstemp()
     os.close(fd)
-    p = Popen(['metaflac', '--export-picture-to=' + picfn, fn], stderr=PIPE)
+    p = Popen(['metaflac', '--export-picture-to', picfn, fn], stderr=PIPE)
     status = p.wait()
     stderr = ''.join(p.stderr)
     # Hacky check for flac with no album art
@@ -126,17 +126,17 @@ def flac2mp3(fn, title, artist, album_artist, album, discnum, date,
         pic_options = "--ti '%s'" % picfn
         os.system('md5sum ' + picfn)
     try:
+        # TODO: Look at TDOR, TDRL, TDRC for date.
         run_or_die(3, "flac %s -cd %s '%s' | lame --id3v2-only --id3v2-latin1 --pad-id3v2-size 0 %s --tt '%s' --ta '%s' --tl '%s' --ty '%s' --tn %d %s %s %s - '%s'"
                    % (flac_options, ' '.join(skip_until), fn,
                       lame_options, title, artist, album, date, track,
                       pic_options, album_artist_options,
                       discnum_options, quoted_outfile))
     finally:
-        if pic:
-            try:
-                os.unlink(picfn)
-            except:
-                pass
+        try:
+            os.unlink(picfn)
+        except:
+            pass
 
     return 0