[SCM] morituri/master: * morituri/common/program.py: Actually return the result from verifyTrack. Debug the cache loading some more. Make a note for a TODO.

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


The following commit has been merged in the master branch:
commit 69a1e731a3a5a94e1b7eefe6606d319babd88eed
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Sun Jan 22 11:00:55 2012 +0000

    	* morituri/common/program.py:
    	  Actually return the result from verifyTrack.
    	  Debug the cache loading some more.  Make a note for a TODO.

diff --git a/ChangeLog b/ChangeLog
index ec62ae5..8dd834d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-01-22  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+	* morituri/common/program.py:
+	  Actually return the result from verifyTrack.
+	  Debug the cache loading some more.  Make a note for a TODO.
+
 2012-01-21  Thomas Vander Stichele  <thomas at apestaart dot org>
 
 	* morituri/common/musicbrainzngs.py:
diff --git a/morituri/common/program.py b/morituri/common/program.py
index 7aed499..531d435 100644
--- a/morituri/common/program.py
+++ b/morituri/common/program.py
@@ -117,6 +117,7 @@ class Program(log.Loggable):
 
         return itable
 
+    # FIXME: the cache should be model/offset specific
     def getRipResult(self, cddbdiscid):
         """
         Retrieve the persistable RipResult either from our cache (from a
@@ -132,8 +133,13 @@ class Program(log.Loggable):
         presult = pcache.get(cddbdiscid)
 
         if not presult.object:
+            self.debug('result for cddbdiscid %r not in cache, creating',
+                cddbdiscid)
             presult.object = result.RipResult()
             presult.persist(self.result)
+        else:
+            self.debug('result for cddbdiscid %r found in cache, reusing',
+                cddbdiscid)
 
         self.result = presult.object
         self._presult = presult
@@ -410,6 +416,7 @@ class Program(log.Loggable):
         log.debug('program',
             'verifyTrack: track result crc %r, file crc %r, result %r',
             trackResult.testcrc, t.checksum, ret)
+        return ret
 
     def ripTrack(self, runner, trackResult, offset, device, profile, taglist,
         what=None):

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list