]> diplodocus.org Git - flac-archive/commitdiff
make the do_write stub actually work (missing imports and typos)
author <epg@pretzelnet.org> <>
Thu, 27 Dec 2012 00:43:13 +0000 (16:43 -0800)
committer <epg@pretzelnet.org> <>
Thu, 27 Dec 2012 00:43:13 +0000 (16:43 -0800)
rewrite-tags

index e164f3f..b20a8ea 100755 (executable)
@@ -1,6 +1,7 @@
 #! /usr/bin/python
 
 #! /usr/bin/python
 
-import sys
+import os, sys
+from errno import EEXIST
 from subprocess import Popen, PIPE
 
 from flac_archive.tags import Tags
 from subprocess import Popen, PIPE
 
 from flac_archive.tags import Tags
@@ -76,7 +77,7 @@ def do_write(args):
                          % (len(tags), len(args)))
         return 4
     artist = tags.get_path_safe('ARTIST')
                          % (len(tags), len(args)))
         return 4
     artist = tags.get_path_safe('ARTIST')
-    album = tags.get_path_safe('ALBUM'),
+    album = tags.get_path_safe('ALBUM')
     try:
         os.mkdir(artist)
     except OSError, e:
     try:
         os.mkdir(artist)
     except OSError, e:
@@ -92,8 +93,8 @@ def do_write(args):
         track = i + 1
         fn = '%s/%s/%s.flac' % (artist, album, tags.make_filename(track))
         if fn != old_fn:
         track = i + 1
         fn = '%s/%s/%s.flac' % (artist, album, tags.make_filename(track))
         if fn != old_fn:
+            print tags.track(track)
             #os.rename(old_fn, fn)
             #os.rename(old_fn, fn)
-            pass
 
 def main(args):
     if len(args) < 3:
 
 def main(args):
     if len(args) < 3: