Merge pull request #245 from RecursiveForest/remove-toc-pickle
remove -T/--toc-pickle
This commit is contained in:
@@ -71,11 +71,6 @@ class _CD(BaseCommand):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def add_arguments(parser):
|
def add_arguments(parser):
|
||||||
# FIXME: have a cache of these pickles somewhere
|
|
||||||
parser.add_argument('-T', '--toc-pickle',
|
|
||||||
action="store", dest="toc_pickle",
|
|
||||||
help="pickle to use for reading and "
|
|
||||||
"writing the TOC")
|
|
||||||
parser.add_argument('-R', '--release-id',
|
parser.add_argument('-R', '--release-id',
|
||||||
action="store", dest="release_id",
|
action="store", dest="release_id",
|
||||||
help="MusicBrainz release id to match to "
|
help="MusicBrainz release id to match to "
|
||||||
@@ -103,9 +98,7 @@ class _CD(BaseCommand):
|
|||||||
utils.unmount_device(self.device)
|
utils.unmount_device(self.device)
|
||||||
|
|
||||||
# first, read the normal TOC, which is fast
|
# first, read the normal TOC, which is fast
|
||||||
self.ittoc = self.program.getFastToc(self.runner,
|
self.ittoc = self.program.getFastToc(self.runner, self.device)
|
||||||
self.options.toc_pickle,
|
|
||||||
self.device)
|
|
||||||
|
|
||||||
# already show us some info based on this
|
# already show us some info based on this
|
||||||
self.program.getRipResult(self.ittoc.getCDDBDiscId())
|
self.program.getRipResult(self.ittoc.getCDDBDiscId())
|
||||||
|
|||||||
@@ -95,24 +95,15 @@ class Program:
|
|||||||
logger.info('Changing to working directory %s' % workingDirectory)
|
logger.info('Changing to working directory %s' % workingDirectory)
|
||||||
os.chdir(workingDirectory)
|
os.chdir(workingDirectory)
|
||||||
|
|
||||||
def getFastToc(self, runner, toc_pickle, device):
|
def getFastToc(self, runner, device):
|
||||||
"""Retrieve the normal TOC table from a toc pickle or the drive.
|
"""Retrieve the normal TOC table from a toc pickle or the drive.
|
||||||
|
|
||||||
Also retrieves the cdrdao version
|
Also retrieves the cdrdao version
|
||||||
|
|
||||||
:param runner:
|
|
||||||
:type runner:
|
|
||||||
:param toc_pickle:
|
|
||||||
:type toc_pickle:
|
|
||||||
:param device:
|
|
||||||
:type device:
|
|
||||||
:returns:
|
|
||||||
:rtype: tuple of L{table.Table}, str
|
|
||||||
"""
|
"""
|
||||||
def function(r, t):
|
def function(r, t):
|
||||||
r.run(t)
|
r.run(t)
|
||||||
|
|
||||||
ptoc = cache.Persister(toc_pickle or None)
|
ptoc = cache.Persister()
|
||||||
if not ptoc.object:
|
if not ptoc.object:
|
||||||
from pkg_resources import parse_version as V
|
from pkg_resources import parse_version as V
|
||||||
version = cdrdao.getCDRDAOVersion()
|
version = cdrdao.getCDRDAOVersion()
|
||||||
|
|||||||
Reference in New Issue
Block a user