[SCM] morituri/master: shorten accurip variable names
js at users.alioth.debian.org
js at users.alioth.debian.org
Sun Oct 19 20:09:09 UTC 2014
The following commit has been merged in the master branch:
commit c24574dfec7359c5620cfa2fc0b6e7cb6230c82c
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date: Wed Jun 24 17:17:17 2009 +0000
shorten accurip variable names
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()
--
morituri packaging
More information about the pkg-multimedia-commits
mailing list