* morituri/image/cue.py:
* morituri/image/image.py: * morituri/image/table.py: * morituri/image/toc.py: * morituri/program/cdparanoia.py: * morituri/program/cdrdao.py: * morituri/test/test_image_cue.py: * morituri/test/test_image_table.py: Rename IndexTable to Table.
This commit is contained in:
12
ChangeLog
12
ChangeLog
@@ -1,3 +1,15 @@
|
||||
2009-05-16 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* morituri/image/cue.py:
|
||||
* morituri/image/image.py:
|
||||
* morituri/image/table.py:
|
||||
* morituri/image/toc.py:
|
||||
* morituri/program/cdparanoia.py:
|
||||
* morituri/program/cdrdao.py:
|
||||
* morituri/test/test_image_cue.py:
|
||||
* morituri/test/test_image_table.py:
|
||||
Rename IndexTable to Table.
|
||||
|
||||
2009-05-16 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* morituri/image/cue.py:
|
||||
|
||||
@@ -61,7 +61,7 @@ class CueFile(object, log.Loggable):
|
||||
"""
|
||||
I represent a .cue file as an object.
|
||||
|
||||
@type table: L{table.IndexTable}
|
||||
@type table: L{table.Table}
|
||||
@ivar table: the index table.
|
||||
"""
|
||||
def __init__(self, path):
|
||||
@@ -69,7 +69,7 @@ class CueFile(object, log.Loggable):
|
||||
self._rems = {}
|
||||
self._messages = []
|
||||
self.leadout = None
|
||||
self.table = table.IndexTable()
|
||||
self.table = table.Table()
|
||||
|
||||
def parse(self):
|
||||
state = 'HEADER'
|
||||
|
||||
@@ -88,7 +88,7 @@ class Image(object, log.Loggable):
|
||||
|
||||
offset += length
|
||||
|
||||
self.table = table.IndexTable(tracks)
|
||||
self.table = table.Table(tracks)
|
||||
self.table.leadout = offset
|
||||
self.debug('setup image done')
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ CDTEXT_FIELDS = [
|
||||
|
||||
class Track:
|
||||
"""
|
||||
I represent a track entry in an IndexTable.
|
||||
I represent a track entry in an Table.
|
||||
|
||||
@ivar number: track number (1-based)
|
||||
@type number: int
|
||||
@@ -112,7 +112,7 @@ class Index:
|
||||
return '<Index %02d, absolute %r, path %r, relative %r, counter %r>' % (
|
||||
self.number, self.absolute, self.path, self.relative, self.counter)
|
||||
|
||||
class IndexTable(object, log.Loggable):
|
||||
class Table(object, log.Loggable):
|
||||
"""
|
||||
I represent a table of indexes on a CD.
|
||||
|
||||
@@ -506,10 +506,10 @@ class IndexTable(object, log.Loggable):
|
||||
return track, indexes[0]
|
||||
|
||||
|
||||
# various tests for types of IndexTable
|
||||
# various tests for types of Table
|
||||
def hasTOC(self):
|
||||
"""
|
||||
Check if the Index Table has a complete TOC.
|
||||
Check if the Table has a complete TOC.
|
||||
a TOC is a list of all tracks and their Index 01, with absolute
|
||||
offsets, as well as the leadout.
|
||||
"""
|
||||
|
||||
@@ -74,7 +74,7 @@ class TocFile(object, log.Loggable):
|
||||
def __init__(self, path):
|
||||
self._path = path
|
||||
self._messages = []
|
||||
self.table = table.IndexTable()
|
||||
self.table = table.Table()
|
||||
|
||||
def parse(self):
|
||||
state = 'HEADER'
|
||||
|
||||
@@ -89,7 +89,7 @@ class ReadTrackTask(task.Task):
|
||||
@param path: where to store the ripped track
|
||||
@type path: str
|
||||
@param table: table of contents of CD
|
||||
@type table: L{table.IndexTable}
|
||||
@type table: L{table.Table}
|
||||
@param start: first frame to rip
|
||||
@type start: int
|
||||
@param stop: last frame to rip (inclusive)
|
||||
|
||||
@@ -78,7 +78,7 @@ class OutputParser(object, log.Loggable):
|
||||
self._track = None # which track are we analyzing?
|
||||
self._task = taskk
|
||||
|
||||
self.table = table.IndexTable() # the index table for the TOC
|
||||
self.table = table.Table() # the index table for the TOC
|
||||
|
||||
def read(self, bytes):
|
||||
self.log('received %d bytes in state %s', len(bytes), self._state)
|
||||
@@ -251,12 +251,12 @@ class CDRDAOTask(task.Task):
|
||||
raise NotImplentedError
|
||||
|
||||
|
||||
class ReadIndexTableTask(CDRDAOTask):
|
||||
class ReadTableTask(CDRDAOTask):
|
||||
"""
|
||||
I am a task that reads all indexes of a CD.
|
||||
|
||||
@ivar table: the index table
|
||||
@type table: L{table.IndexTable}
|
||||
@type table: L{table.Table}
|
||||
"""
|
||||
|
||||
description = "Scanning indexes..."
|
||||
@@ -275,7 +275,7 @@ class ReadIndexTableTask(CDRDAOTask):
|
||||
self.parser.read(bytes)
|
||||
|
||||
def done(self):
|
||||
# FIXME: instead of reading only a TOC, output a complete IndexTable
|
||||
# FIXME: instead of reading only a TOC, output a complete Table
|
||||
# by merging the TOC info.
|
||||
self._tocfile = toc.TocFile(self._tocfilepath)
|
||||
self._tocfile.parse()
|
||||
@@ -304,7 +304,7 @@ class ReadTOCTask(CDRDAOTask):
|
||||
I am a task that reads the TOC of a CD, without pregaps.
|
||||
|
||||
@ivar table: the index table that matches the TOC.
|
||||
@type table: L{table.IndexTable}
|
||||
@type table: L{table.Table}
|
||||
"""
|
||||
|
||||
description = "Reading TOC..."
|
||||
|
||||
@@ -54,7 +54,7 @@ class WriteCueFileTestCase(unittest.TestCase):
|
||||
fd, path = tempfile.mkstemp(suffix='morituri.test.cue')
|
||||
os.close(fd)
|
||||
|
||||
it = table.IndexTable()
|
||||
it = table.Table()
|
||||
|
||||
|
||||
t = table.Track(1)
|
||||
|
||||
@@ -18,7 +18,7 @@ class LadyhawkeTestCase(unittest.TestCase):
|
||||
# AccurateRip URL has been verified against EAC's, using wireshark
|
||||
|
||||
def setUp(self):
|
||||
self.table = table.IndexTable()
|
||||
self.table = table.Table()
|
||||
|
||||
for i in range(12):
|
||||
self.table.tracks.append(table.Track(i + 1, audio=True))
|
||||
@@ -53,7 +53,7 @@ class MusicBrainzTestCase(unittest.TestCase):
|
||||
# disc is Ettella Diamant
|
||||
|
||||
def setUp(self):
|
||||
self.table = table.IndexTable()
|
||||
self.table = table.Table()
|
||||
|
||||
for i in range(6):
|
||||
self.table.tracks.append(table.Track(i + 1, audio=True))
|
||||
|
||||
Reference in New Issue
Block a user