[SCM] morituri/master: add debug resultcache cue command
js at users.alioth.debian.org
js at users.alioth.debian.org
Sun Oct 19 20:10:14 UTC 2014
The following commit has been merged in the master branch:
commit afd638fa4bd1b752cf00b230d1c6c74f3c146042
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date: Sun Aug 25 17:18:04 2013 +0200
add debug resultcache cue command
to output a cue from a cached result
diff --git a/morituri/rip/debug.py b/morituri/rip/debug.py
index 369be4c..00c1a12 100644
--- a/morituri/rip/debug.py
+++ b/morituri/rip/debug.py
@@ -25,6 +25,23 @@ from morituri.result import result
from morituri.common import task, cache
+class RCCue(logcommand.LogCommand):
+
+ name = "cue"
+ summary = "write a cue file for the cached result"
+
+ def do(self, args):
+ self._cache = cache.ResultCache()
+
+ persisted = self._cache.getRipResult(args[0], create=False)
+
+ if not persisted:
+ self.stderr.write(
+ 'Could not find a result for cddb disc id %s\n' % args[0])
+ return 3
+
+ self.stdout.write(persisted.object.table.cue().encode('utf-8'))
+
class RCList(logcommand.LogCommand):
@@ -85,14 +102,14 @@ class RCLog(logcommand.LogCommand):
logger = klazz()
self.stdout.write(logger.log(persisted.object).encode('utf-8'))
-
+
class ResultCache(logcommand.LogCommand):
summary = "debug result cache"
aliases = ['rc', ]
- subCommandClasses = [RCList, RCLog, ]
+ subCommandClasses = [RCCue, RCList, RCLog, ]
class Checksum(logcommand.LogCommand):
--
morituri packaging
More information about the pkg-multimedia-commits
mailing list