[SCM] morituri/master: remove Rename operation currently unused and done on branch

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Oct 19 20:10:15 UTC 2014


The following commit has been merged in the master branch:
commit 612ae766ae2c4046d72dadd9704dd1ab675dbff4
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Sat Nov 23 16:04:58 2013 -0500

    remove Rename operation currently unused and done on branch
    
    feature-rename

diff --git a/morituri/rip/image.py b/morituri/rip/image.py
index 6c766d6..a770f06 100644
--- a/morituri/rip/image.py
+++ b/morituri/rip/image.py
@@ -22,7 +22,7 @@
 
 import os
 
-from morituri.common import logcommand, accurip, program, encode, renamer
+from morituri.common import logcommand, accurip, program
 from morituri.image import image
 from morituri.result import result
 
@@ -110,6 +110,9 @@ class Retag(logcommand.LogCommand):
 
 
     def do(self, args):
+        # here to avoid import gst eating our options
+        from morituri.common import encode
+
         prog = program.Program(self.getRootCommand().config, stdout=self.stdout)
         runner = task.SyncRunner()
 
@@ -147,56 +150,6 @@ class Retag(logcommand.LogCommand):
                     print '%s already tagged correctly' % path
             print
 
-class Rename(logcommand.LogCommand):
-
-    summary = "rename image and all files based on metadata"
-
-    def addOptions(self):
-        self.parser.add_option('-R', '--release-id',
-            action="store", dest="release_id",
-            help="MusicBrainz release id to match to (if there are multiple)")
-
-
-    def do(self, args):
-        prog = program.Program(self.getRootCommand.config(), stdout=self.stdout)
-        runner = task.SyncRunner()
-
-        for arg in args:
-            self.stdout.write('Renaming image %r\n' % arg)
-            arg = arg.decode('utf-8')
-            cueImage = image.Image(arg)
-            cueImage.setup(runner)
-
-            mbdiscid = cueImage.table.getMusicBrainzDiscId()
-
-            operator = renamer.Operator(statePath, mbdiscid)
-
-            self.stdout.write('MusicBrainz disc id is %s\n' % mbdiscid)
-            prog.metadata = prog.getMusicBrainz(cueImage.table, mbdiscid,
-                release=self.options.release_id)
-
-            if not prog.metadata:
-                print 'Not in MusicBrainz database, skipping'
-                continue
-
-            # FIXME: this feels like we're poking at internals.
-            prog.cuePath = arg
-            prog.result = result.RipResult()
-            for track in cueImage.table.tracks:
-                path = cueImage.getRealPath(track.indexes[1].path)
-
-                taglist = prog.getTagList(track.number)
-                self.debug(
-                    'possibly retagging %r from cue path %r with taglist %r',
-                    path, arg, taglist)
-                t = encode.SafeRetagTask(path, taglist)
-                runner.run(t)
-                path = os.path.basename(path)
-                if t.changed:
-                    print 'Retagged %s' % path
-                else:
-                    print '%s already tagged correctly' % path
-            print
 
 class Verify(logcommand.LogCommand):
 

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list