* examples/readdisc.py:
* morituri/image/table.py: * morituri/test/test_image_table.py: Fix up and deprecate stuff.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2009-05-05 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* examples/readdisc.py:
|
||||
* morituri/image/table.py:
|
||||
* morituri/test/test_image_table.py:
|
||||
Fix up and deprecate stuff.
|
||||
|
||||
2009-05-04 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* examples/movecue.py:
|
||||
|
||||
@@ -123,15 +123,14 @@ def main(argv):
|
||||
function(runner, t)
|
||||
ptable.persist(t.toc)
|
||||
itable = ptable.object
|
||||
import code; code.interact(local=locals())
|
||||
|
||||
lastTrackStart = 0
|
||||
|
||||
for i, track in enumerate(itable.tracks):
|
||||
print 'Ripping track %d' % (i + 1)
|
||||
path = 'track%02d.wav' % (i + 1)
|
||||
# FIXME: optionally allow overriding reripping
|
||||
if not os.path.exists(path):
|
||||
print 'Ripping track %d' % (i + 1)
|
||||
t = cdparanoia.ReadVerifyTrackTask(path, ittoc, ittoc.getTrackStart(i + 1),
|
||||
ittoc.getTrackEnd(i + 1),
|
||||
offset=int(options.offset))
|
||||
@@ -150,7 +149,7 @@ def main(argv):
|
||||
# first copy over index 0 if there is any
|
||||
try:
|
||||
sector, _ = tocTrack.getIndex(0)
|
||||
t.index(0, path=path, relative=sector - lastTrackStart)
|
||||
ittrack.index(0, path=path, relative=sector - lastTrackStart)
|
||||
except KeyError:
|
||||
pass
|
||||
lastTrackStart, _ = tocTrack.getIndex(1)
|
||||
|
||||
@@ -31,7 +31,7 @@ import gst
|
||||
|
||||
from morituri.common import task, checksum, common
|
||||
|
||||
class Track:
|
||||
class DeleteMeTrack:
|
||||
"""
|
||||
I represent a track entry in a Table of Contents.
|
||||
|
||||
@@ -59,7 +59,7 @@ class Track:
|
||||
self.end = end
|
||||
self.audio = audio
|
||||
|
||||
class Table:
|
||||
class DeleteMeTable:
|
||||
"""
|
||||
I represent the Table of Contents of a CD.
|
||||
|
||||
|
||||
@@ -18,21 +18,19 @@ class LadyhawkeTestCase(unittest.TestCase):
|
||||
# AccurateRip URL has been verified against EAC's, using wireshark
|
||||
|
||||
def setUp(self):
|
||||
self.table = table.Table([
|
||||
table.Track( 1, 0, 15536),
|
||||
table.Track( 2, 15537, 31690),
|
||||
table.Track( 3, 31691, 50865),
|
||||
table.Track( 4, 50866, 66465),
|
||||
table.Track( 5, 66466, 81201),
|
||||
table.Track( 6, 81202, 99408),
|
||||
table.Track( 7, 99409, 115919),
|
||||
table.Track( 8, 115920, 133092),
|
||||
table.Track( 9, 133093, 149846),
|
||||
table.Track(10, 149847, 161559),
|
||||
table.Track(11, 161560, 177681),
|
||||
table.Track(12, 177682, 195705),
|
||||
table.Track(13, 207106, 210384, audio=False),
|
||||
])
|
||||
self.table = table.IndexTable()
|
||||
|
||||
for i in range(12):
|
||||
self.table.tracks.append(table.ITTrack(i + 1, audio=True))
|
||||
self.table.tracks.append(table.ITTrack(13, audio=False))
|
||||
|
||||
offsets = [0, 15537, 31691, 50866, 66466, 81202, 99409,
|
||||
115920, 133093, 149847, 161560, 177682, 207106]
|
||||
t = self.table.tracks
|
||||
for i, offset in enumerate(offsets):
|
||||
t[i].index(1, absolute=offset)
|
||||
|
||||
self.table.leadout = 210385
|
||||
|
||||
def testCDDB(self):
|
||||
self.assertEquals(self.table.getCDDBDiscId(), "c60af50d")
|
||||
|
||||
Reference in New Issue
Block a user