diff --git a/ChangeLog b/ChangeLog index 1e3bb8f..9585f7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2009-05-16 Thomas Vander Stichele + + * 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 * morituri/image/cue.py: diff --git a/morituri/image/cue.py b/morituri/image/cue.py index 763a0cf..d60adc7 100644 --- a/morituri/image/cue.py +++ b/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' diff --git a/morituri/image/image.py b/morituri/image/image.py index 8003b98..77dd840 100644 --- a/morituri/image/image.py +++ b/morituri/image/image.py @@ -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') diff --git a/morituri/image/table.py b/morituri/image/table.py index 0b09221..b1ced8d 100644 --- a/morituri/image/table.py +++ b/morituri/image/table.py @@ -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 '' % ( 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. """ diff --git a/morituri/image/toc.py b/morituri/image/toc.py index f080139..c537668 100644 --- a/morituri/image/toc.py +++ b/morituri/image/toc.py @@ -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' diff --git a/morituri/program/cdparanoia.py b/morituri/program/cdparanoia.py index d8a2bed..b05efbf 100644 --- a/morituri/program/cdparanoia.py +++ b/morituri/program/cdparanoia.py @@ -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) diff --git a/morituri/program/cdrdao.py b/morituri/program/cdrdao.py index 75c7df0..b7221e0 100644 --- a/morituri/program/cdrdao.py +++ b/morituri/program/cdrdao.py @@ -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..." diff --git a/morituri/test/test_image_cue.py b/morituri/test/test_image_cue.py index 67a05cd..1e3d4a8 100644 --- a/morituri/test/test_image_cue.py +++ b/morituri/test/test_image_cue.py @@ -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) diff --git a/morituri/test/test_image_table.py b/morituri/test/test_image_table.py index 400a84f..d8d275b 100644 --- a/morituri/test/test_image_table.py +++ b/morituri/test/test_image_table.py @@ -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))