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:
Merlijn Wajer
2016-07-23 13:58:19 +02:00
parent 9ae279c811
commit bce359f9d5
3 changed files with 9 additions and 5 deletions

View File

@@ -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

View File

@@ -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):

View File

@@ -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)