From c24574dfec7359c5620cfa2fc0b6e7cb6230c82c Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Wed, 24 Jun 2009 17:17:17 +0000 Subject: [PATCH] shorten accurip variable names --- morituri/common/program.py | 10 +++++----- morituri/result/logger.py | 8 ++++---- morituri/result/result.py | 18 +++++++++--------- morituri/rip/cd.py | 18 +++++++++--------- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/morituri/common/program.py b/morituri/common/program.py index afb8bce..c2df9f3 100644 --- a/morituri/common/program.py +++ b/morituri/common/program.py @@ -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): diff --git a/morituri/result/logger.py b/morituri/result/logger.py index 8a6145b..f0eb187 100644 --- a/morituri/result/logger.py +++ b/morituri/result/logger.py @@ -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') diff --git a/morituri/result/result.py b/morituri/result/result.py index 02d6f21..e141d1a 100644 --- a/morituri/result/result.py +++ b/morituri/result/result.py @@ -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 diff --git a/morituri/rip/cd.py b/morituri/rip/cd.py index a0016ed..3d9e6c0 100644 --- a/morituri/rip/cd.py +++ b/morituri/rip/cd.py @@ -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()