Use Fast version of AccurateRipChecksumTask
There are still some changes required to make whipper handle ARv2 checksums, currently doesn't call the Task for a V2 checksum. V1 should keep working as-is.
This commit is contained in:
@@ -715,6 +715,7 @@ class Program(log.Loggable):
|
||||
else:
|
||||
trackResult.ARDBCRC = int(response.checksums[i], 16)
|
||||
|
||||
# TODO MW: Update this further for ARv2 code
|
||||
def getAccurateRipResults(self):
|
||||
"""
|
||||
@rtype: list of str
|
||||
|
||||
@@ -112,6 +112,7 @@ class AccurateRipChecksumTask(log.Loggable, task.MultiSeparateTask):
|
||||
|
||||
description = "Checksumming tracks"
|
||||
|
||||
# TODO MW: Update this further for V2 code
|
||||
def __init__(self, image):
|
||||
task.MultiSeparateTask.__init__(self)
|
||||
|
||||
@@ -134,10 +135,10 @@ class AccurateRipChecksumTask(log.Loggable, task.MultiSeparateTask):
|
||||
# here to avoid import gst eating our options
|
||||
from morituri.common import checksum
|
||||
|
||||
checksumTask = checksum.AccurateRipChecksumTask(path,
|
||||
checksumTask = checksum.FastAccurateRipChecksumTask(path,
|
||||
trackNumber=trackIndex + 1, trackCount=len(cue.table.tracks),
|
||||
sampleStart=index.relative * common.SAMPLES_PER_FRAME,
|
||||
sampleLength=length * common.SAMPLES_PER_FRAME)
|
||||
wave=True, v2=False)
|
||||
|
||||
self.addTask(checksumTask)
|
||||
|
||||
def stop(self):
|
||||
|
||||
@@ -207,6 +207,7 @@ CD in the AccurateRip database."""
|
||||
self.stdout.write('No matching offset found.\n')
|
||||
self.stdout.write('Consider trying again with a different disc.\n')
|
||||
|
||||
# TODO MW: Update this further for ARv2 code
|
||||
def _arcs(self, runner, table, track, offset):
|
||||
# rips the track with the given offset, return the arcs checksum
|
||||
self.debug('Ripping track %r with offset %d ...', track, offset)
|
||||
@@ -226,8 +227,9 @@ CD in the AccurateRip database."""
|
||||
# here to avoid import gst eating our options
|
||||
from morituri.common import checksum
|
||||
|
||||
t = checksum.AccurateRipChecksumTask(path, trackNumber=track,
|
||||
trackCount=len(table.tracks))
|
||||
# TODO MW: Update this to also use the v2 checksum(s)
|
||||
t = checksum.FastAccurateRipChecksumTask(path, trackNumber=track,
|
||||
trackCount=len(table.tracks), wave=True, v2=False)
|
||||
runner.run(t)
|
||||
|
||||
os.unlink(path)
|
||||
|
||||
Reference in New Issue
Block a user