[SCM] morituri/master: * morituri/rip/debug.py: Add rip debug tag to debug reading tags.

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Oct 19 20:09:50 UTC 2014


The following commit has been merged in the master branch:
commit 326caa84a8a96a4ab37d979b1ecb0fd4468368b6
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Thu Dec 6 17:16:41 2012 +0000

    	* morituri/rip/debug.py:
    	  Add rip debug tag to debug reading tags.

diff --git a/ChangeLog b/ChangeLog
index bb57c78..7ec0402 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2012-12-06  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+	* morituri/rip/debug.py:
+	  Add rip debug tag to debug reading tags.
+
+2012-12-06  Thomas Vander Stichele  <thomas at apestaart dot org>
+
 	* morituri/rip/image.py:
 	  Use getRealPath when retagging an image, fixes bug where it
 	  doesn't find the files relative to the cuepath.
diff --git a/morituri/rip/debug.py b/morituri/rip/debug.py
index 2deae0d..0dfbe48 100644
--- a/morituri/rip/debug.py
+++ b/morituri/rip/debug.py
@@ -155,6 +155,28 @@ class Encode(logcommand.LogCommand):
 
         runner.run(encodetask)
 
+class Tag(logcommand.LogCommand):
+
+    summary = "run a tag reading task"
+
+    def do(self, args):
+        try:
+            path = unicode(args[0])
+        except IndexError:
+            self.stdout.write('Please specify an input file.\n')
+            return 3
+
+        runner = task.SyncRunner()
+
+        from morituri.common import encode
+        self.debug('Reading tags from %s' % path.encode('utf-8'))
+        tagtask = encode.TagReadTask(path)
+
+        runner.run(tagtask)
+
+        for key in tagtask.taglist.keys():
+            self.stdout.write('%s: %r\n' % (key, tagtask.taglist[key]))
+
 
 class MusicBrainzNGS(logcommand.LogCommand):
 
@@ -187,4 +209,4 @@ class Debug(logcommand.LogCommand):
 
     summary = "debug internals"
 
-    subCommandClasses = [Checksum, Encode, MusicBrainzNGS, ResultCache]
+    subCommandClasses = [Checksum, Encode, Tag, MusicBrainzNGS, ResultCache]

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list