]> diplodocus.org Git - flac-archive/blobdiff - flac2mp3
Set encoding of description.
[flac-archive] / flac2mp3
index 20ab4760344d64e189e4f9b535c2031172a80368..b4ce99eff1c127166ebab67913f100a09ad49553 100755 (executable)
--- a/flac2mp3
+++ b/flac2mp3
@@ -84,17 +84,21 @@ def flac2mp3(fn, title, artist, album, date, track, skip_until, pic=None):
     verbose and tmp.append('--verbose')
     lame_options = ' '.join(tmp)
 
     verbose and tmp.append('--verbose')
     lame_options = ' '.join(tmp)
 
+    outfile = ('%s (%s) %02d %s.mp3' % (artist, album,
+                                        track, title)).replace('/', '_')
+
     # Escape any single quotes ' so we can quote this.
     (fn, title, artist,
      album, date) = [x.replace("'", r"'\''")
                      for x in (fn, title, artist, album, date)]
 
     # Escape any single quotes ' so we can quote this.
     (fn, title, artist,
      album, date) = [x.replace("'", r"'\''")
                      for x in (fn, title, artist, album, date)]
 
-    outfile = ('%s (%s) %02d %s.mp3' % (artist, album,
-                                        track, title)).replace('/', '_')
+    quoted_outfile = ('%s (%s) %02d %s.mp3' % (artist, album,
+                                               track, title)).replace('/', '_')
 
     run_or_die(3, "flac %s -cd %s %s '%s' | lame --add-id3v2 %s --tt '%s' --ta '%s' --tl '%s' --ty '%s' --tn %d - '%s'"
                % (flac_options, skip_arg or '', until_arg or '', fn,
 
     run_or_die(3, "flac %s -cd %s %s '%s' | lame --add-id3v2 %s --tt '%s' --ta '%s' --tl '%s' --ty '%s' --tn %d - '%s'"
                % (flac_options, skip_arg or '', until_arg or '', fn,
-                  lame_options, title, artist, album, date, track, outfile))
+                  lame_options, title, artist, album, date, track,
+                  quoted_outfile))
 
     if pic != None:
         taglib.add_apic_frame_to_mp3(outfile, pic[0], pic[1], pic[2])
 
     if pic != None:
         taglib.add_apic_frame_to_mp3(outfile, pic[0], pic[1], pic[2])