* examples/movecue.py:
* examples/readcue.py: * morituri/image/cue.py: * morituri/image/image.py: * morituri/image/toc.py: * morituri/program/cdrdao.py: * morituri/test/test_image_cue.py: * morituri/test/test_image_toc.py: Cue -> CueFile TOC -> TocFile
This commit is contained in:
13
ChangeLog
13
ChangeLog
@@ -1,3 +1,16 @@
|
||||
2009-05-04 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* examples/movecue.py:
|
||||
* examples/readcue.py:
|
||||
* morituri/image/cue.py:
|
||||
* morituri/image/image.py:
|
||||
* morituri/image/toc.py:
|
||||
* morituri/program/cdrdao.py:
|
||||
* morituri/test/test_image_cue.py:
|
||||
* morituri/test/test_image_toc.py:
|
||||
Cue -> CueFile
|
||||
TOC -> TocFile
|
||||
|
||||
2009-05-04 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* examples/readdisc.py (added):
|
||||
|
||||
@@ -31,7 +31,7 @@ from morituri.image import cue
|
||||
|
||||
def move(path):
|
||||
print 'reading', path
|
||||
cuefile = cue.Cue(path)
|
||||
cuefile = cue.CueFile(path)
|
||||
cuefile.parse()
|
||||
|
||||
track = cuefile.tracks[0]
|
||||
|
||||
@@ -25,7 +25,7 @@ import sys
|
||||
from morituri.image import cue
|
||||
|
||||
def main(path):
|
||||
cuefile = cue.Cue(path)
|
||||
cuefile = cue.CueFile(path)
|
||||
cuefile.parse()
|
||||
|
||||
print cuefile.tracks
|
||||
|
||||
@@ -57,7 +57,7 @@ _INDEX_RE = re.compile(r"""
|
||||
""", re.VERBOSE)
|
||||
|
||||
|
||||
class Cue(object, log.Loggable):
|
||||
class CueFile(object, log.Loggable):
|
||||
def __init__(self, path):
|
||||
self._path = path
|
||||
self._rems = {}
|
||||
|
||||
@@ -45,7 +45,7 @@ class Image(object, log.Loggable):
|
||||
@param path: .cue path
|
||||
"""
|
||||
self._path = path
|
||||
self.cue = cue.Cue(path)
|
||||
self.cue = cue.CueFile(path)
|
||||
self.cue.parse()
|
||||
self._offsets = [] # 0 .. trackCount - 1
|
||||
self._lengths = [] # 0 .. trackCount - 1
|
||||
|
||||
@@ -64,7 +64,7 @@ _INDEX_RE = re.compile(r"""
|
||||
\s(?P<offset>.+)$ # start offset
|
||||
""", re.VERBOSE)
|
||||
|
||||
class TOC:
|
||||
class TocFile(object):
|
||||
def __init__(self, path):
|
||||
self._path = path
|
||||
self._messages = []
|
||||
|
||||
@@ -260,7 +260,7 @@ class ReadIndexTableTask(CDRDAOTask):
|
||||
def done(self):
|
||||
# FIXME: instead of reading only a TOC, output a complete IndexTable
|
||||
# by merging the TOC info.
|
||||
self.toc = toc.TOC(self._toc)
|
||||
self.toc = toc.TocFile(self._toc)
|
||||
self.toc.parse()
|
||||
os.unlink(self._toc)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ from morituri.image import table, cue
|
||||
|
||||
class KingsSingleTestCase(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.cue = cue.Cue(os.path.join(os.path.dirname(__file__),
|
||||
self.cue = cue.CueFile(os.path.join(os.path.dirname(__file__),
|
||||
'kings-single.cue'))
|
||||
self.cue.parse()
|
||||
self.assertEquals(len(self.cue.tracks), 11)
|
||||
@@ -25,7 +25,7 @@ class KingsSingleTestCase(unittest.TestCase):
|
||||
|
||||
class KingsSeparateTestCase(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.cue = cue.Cue(os.path.join(os.path.dirname(__file__),
|
||||
self.cue = cue.CueFile(os.path.join(os.path.dirname(__file__),
|
||||
'kings-separate.cue'))
|
||||
self.cue.parse()
|
||||
self.assertEquals(len(self.cue.tracks), 11)
|
||||
@@ -39,7 +39,7 @@ class KingsSeparateTestCase(unittest.TestCase):
|
||||
|
||||
class KanyeMixedTestCase(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.cue = cue.Cue(os.path.join(os.path.dirname(__file__),
|
||||
self.cue = cue.CueFile(os.path.join(os.path.dirname(__file__),
|
||||
'kanye.cue'))
|
||||
self.cue.parse()
|
||||
self.assertEquals(len(self.cue.tracks), 13)
|
||||
@@ -49,7 +49,7 @@ class KanyeMixedTestCase(unittest.TestCase):
|
||||
self.assertEquals(self.cue.getTrackLength(t), -1)
|
||||
|
||||
|
||||
class WriteCueTestCase(unittest.TestCase):
|
||||
class WriteCueFileTestCase(unittest.TestCase):
|
||||
def testWrite(self):
|
||||
fd, path = tempfile.mkstemp(suffix='morituri.test.cue')
|
||||
os.close(fd)
|
||||
|
||||
@@ -8,7 +8,7 @@ from morituri.image import toc
|
||||
|
||||
class CureTestCase(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.toc = toc.TOC(os.path.join(os.path.dirname(__file__),
|
||||
self.toc = toc.TocFile(os.path.join(os.path.dirname(__file__),
|
||||
'cure.toc'))
|
||||
self.toc.parse()
|
||||
self.assertEquals(len(self.toc.tracks), 13)
|
||||
@@ -33,7 +33,7 @@ class CureTestCase(unittest.TestCase):
|
||||
# Bloc Party - Silent Alarm has a Hidden Track One Audio
|
||||
class BlocTestCase(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.toc = toc.TOC(os.path.join(os.path.dirname(__file__),
|
||||
self.toc = toc.TocFile(os.path.join(os.path.dirname(__file__),
|
||||
'bloc.toc'))
|
||||
self.toc.parse()
|
||||
self.assertEquals(len(self.toc.tracks), 13)
|
||||
|
||||
Reference in New Issue
Block a user