diff --git a/ChangeLog b/ChangeLog index 9c6e3ba..0aebe39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-12-02 Thomas Vander Stichele + + * morituri/rip/cd.py: + * morituri/result/result.py: + Store versions and encoding profile info in the rip result. + 2012-12-02 Thomas Vander Stichele * morituri/test/test_common_gstreamer.py (added): diff --git a/morituri/result/result.py b/morituri/result/result.py index 09debf8..2ebed3a 100644 --- a/morituri/result/result.py +++ b/morituri/result/result.py @@ -104,6 +104,13 @@ class RipResult: cdrdaoVersion = None cdparanoiaVersion = None + gstreamerVersion = None + gstPythonVersion = None + encoderVersion = None + + profileName = None + profilePipeline = None + classVersion = 3 def __init__(self): diff --git a/morituri/rip/cd.py b/morituri/rip/cd.py index f2427bf..1e144ed 100644 --- a/morituri/rip/cd.py +++ b/morituri/rip/cd.py @@ -26,8 +26,8 @@ import math import gobject gobject.threads_init() -from morituri.common import logcommand, common, accurip -from morituri.common import drive, program +from morituri.common import logcommand, common, accurip, gstreamer +from morituri.common import drive, program, cache from morituri.result import result from morituri.program import cdrdao, cdparanoia @@ -152,7 +152,7 @@ Log files will log the path to tracks relative to this directory. version = None # first, read the normal TOC, which is fast - ptoc = common.Persister(self.options.toc_pickle or None) + ptoc = cache.Persister(self.options.toc_pickle or None) if not ptoc.object: t = cdrdao.ReadTOCTask(device=device) function(runner, t) @@ -231,6 +231,14 @@ Log files will log the path to tracks relative to this directory. prog.result.model = 'Unknown' prog.result.release = 'Unknown' + prog.result.profileName = profile.name + prog.result.profilePipeline = profile.pipeline + elementFactory = profile.pipeline.split(' ')[0] + prog.result.gstreamerVersion = gstreamer.gstreamerVersion() + prog.result.gstPythonVersion = gstreamer.gstPythonVersion() + prog.result.encoderVersion = gstreamer.elementFactoryVersion( + elementFactory) + # FIXME: turn this into a method def ripIfNotRipped(number): @@ -393,8 +401,8 @@ Log files will log the path to tracks relative to this directory. url = ittoc.getAccurateRipURL() self.stdout.write("AccurateRip URL %s\n" % url) - cache = accurip.AccuCache() - responses = cache.retrieve(url) + accucache = accurip.AccuCache() + responses = accucache.retrieve(url) if not responses: self.stdout.write('Album not found in AccurateRip database\n')