From 69a1e731a3a5a94e1b7eefe6606d319babd88eed Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Sun, 22 Jan 2012 11:00:55 +0000 Subject: [PATCH] * morituri/common/program.py: Actually return the result from verifyTrack. Debug the cache loading some more. Make a note for a TODO. --- ChangeLog | 6 ++++++ morituri/common/program.py | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index ec62ae5..8dd834d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-01-22 Thomas Vander Stichele + + * 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 * 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):