* morituri/rip/debug.py:

Add rip debug tag to debug reading tags.
This commit is contained in:
Thomas Vander Stichele
2012-12-06 17:16:41 +00:00
parent 43963a0050
commit 326caa84a8
2 changed files with 28 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
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:

View File

@@ -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]