shorten accurip variable names
This commit is contained in:
@@ -387,7 +387,7 @@ class Program(log.Loggable):
|
||||
# loop over tracks
|
||||
for i, csum in enumerate(cuetask.checksums):
|
||||
trackResult = self.result.getTrackResult(i + 1)
|
||||
trackResult.accuripCRC = csum
|
||||
trackResult.ARCRC = csum
|
||||
|
||||
confidence = None
|
||||
|
||||
@@ -403,10 +403,10 @@ class Program(log.Loggable):
|
||||
csum, i + 1, j + 1, response.checksums[i])
|
||||
trackResult.accurip = True
|
||||
# FIXME: maybe checksums should be ints
|
||||
trackResult.accuripDatabaseCRC = int(response.checksums[i], 16)
|
||||
trackResult.ARDBCRC = int(response.checksums[i], 16)
|
||||
# arsum = csum
|
||||
confidence = response.confidences[i]
|
||||
trackResult.accuripDatabaseConfidence = confidence
|
||||
trackResult.ARDBConfidence = confidence
|
||||
|
||||
if responses:
|
||||
maxConfidence = 0
|
||||
@@ -417,10 +417,10 @@ class Program(log.Loggable):
|
||||
maxResponse = r
|
||||
|
||||
self.debug('found max confidence %d' % maxConfidence)
|
||||
trackResult.accuripDatabaseMaxConfidence = maxConfidence
|
||||
trackResult.ARDBMaxConfidence = maxConfidence
|
||||
if not response:
|
||||
self.warning('none of the responses matched.')
|
||||
trackResult.accuripDatabaseCRC = int(
|
||||
trackResult.ARDBCRC = int(
|
||||
maxResponse.checksums[i], 16)
|
||||
|
||||
def writeCue(self, discName):
|
||||
|
||||
@@ -112,14 +112,14 @@ class MorituriLogger(object):
|
||||
lines.append(" WARNING: no CRC check done")
|
||||
|
||||
if trackResult.accurip:
|
||||
if trackResult.accuripCRC == trackResult.accuripDatabaseCRC:
|
||||
if trackResult.ARCRC == trackResult.ARDBCRC:
|
||||
lines.append(' Accurately ripped (confidence %d) [%08X]' % (
|
||||
trackResult.accuripDatabaseConfidence, trackResult.accuripCRC))
|
||||
trackResult.ARDBConfidence, trackResult.ARCRC))
|
||||
else:
|
||||
lines.append(' Cannot be verified as accurate '
|
||||
'(confidence %d), [%08X], AccurateRip returned [%08x]' % (
|
||||
trackResult.accuripDatabaseConfidence,
|
||||
trackResult.accuripCRC, trackResult.accuripDatabaseCRC))
|
||||
trackResult.ARDBConfidence,
|
||||
trackResult.ARCRC, trackResult.ARDBCRC))
|
||||
else:
|
||||
lines.append(' Track not present in AccurateRip database')
|
||||
|
||||
|
||||
@@ -31,14 +31,14 @@ class TrackResult:
|
||||
@ivar copycrc: 4-byte CRC for the copy read
|
||||
@type copycrc: int
|
||||
|
||||
@var accuripCRC: our calculated 4 byte AccurateRip CRC for this track.
|
||||
@type accuripCRC: int
|
||||
@var ARCRC: our calculated 4 byte AccurateRip CRC for this track.
|
||||
@type ARCRC: int
|
||||
@var accurip: whether this track's AR CRC was found in the database,
|
||||
and thus whether the track is considered accurately ripped.
|
||||
@type accurip: bool
|
||||
@var accuripDatabaseMaxConfidence: maximum confidence in the AccurateRip
|
||||
database for this track; can still be
|
||||
0. If None, the track was not found.
|
||||
@var ARDBMaxConfidence: maximum confidence in the AccurateRip database for
|
||||
this track; can still be 0. If None, the track
|
||||
was not found.
|
||||
"""
|
||||
number = None
|
||||
filename = None
|
||||
@@ -49,10 +49,10 @@ class TrackResult:
|
||||
testcrc = None
|
||||
copycrc = None
|
||||
accurip = False # whether it's in the database
|
||||
accuripCRC = None
|
||||
accuripDatabaseCRC = None
|
||||
accuripDatabaseConfidence = None
|
||||
accuripDatabaseMaxConfidence = None
|
||||
ARCRC = None
|
||||
ARDBCRC = None
|
||||
ARDBConfidence = None
|
||||
ARDBMaxConfidence = None
|
||||
|
||||
classVersion = 2
|
||||
|
||||
|
||||
@@ -290,18 +290,18 @@ class Rip(logcommand.LogCommand):
|
||||
|
||||
c = "(not found)"
|
||||
ar = "(not in database)"
|
||||
if trackResult.accuripDatabaseMaxConfidence:
|
||||
c = "(max confidence %3d)" % trackResult.accuripDatabaseMaxConfidence
|
||||
if trackResult.accuripDatabaseConfidence is not None:
|
||||
if trackResult.accuripDatabaseConfidence \
|
||||
< trackResult.accuripDatabaseMaxConfidence:
|
||||
if trackResult.ARDBMaxConfidence:
|
||||
c = "(max confidence %3d)" % trackResult.ARDBMaxConfidence
|
||||
if trackResult.ARDBConfidence is not None:
|
||||
if trackResult.ARDBConfidence \
|
||||
< trackResult.ARDBMaxConfidence:
|
||||
c = "(confidence %3d of %3d)" % (
|
||||
trackResult.accuripDatabaseConfidence,
|
||||
trackResult.accuripDatabaseMaxConfidence)
|
||||
trackResult.ARDBConfidence,
|
||||
trackResult.ARDBMaxConfidence)
|
||||
|
||||
ar = ", AR [%08x]" % trackResult.accuripDatabaseCRC
|
||||
ar = ", AR [%08x]" % trackResult.ARDBCRC
|
||||
print "Track %2d: %s %s [%08x]%s" % (
|
||||
i + 1, status, c, trackResult.accuripCRC, ar)
|
||||
i + 1, status, c, trackResult.ARCRC, ar)
|
||||
|
||||
# write log file
|
||||
logger = result.getLogger()
|
||||
|
||||
Reference in New Issue
Block a user