* morituri/program/cdrdao.py:

read all sessions by reading session 9.
	* morituri/image/toc.py:
	  Parse ZERO statements properly.
	  Also set absolute offsets when we know them from the .toc file.
	  Properly set audio flag on tracks.
	  FIXME: probably doesn't work if the .toc does not have lengths.
	* morituri/image/table.py:
	  Add some debug to cddb disc id calculation.
	  Fix absolutize function, it was going one index too far.
	  raise ValueError when overriding .absolute with a wrong value.
	* examples/readdisc.py:
	  Show CDDB disc id at the start.
	  Assert when toc and table have different disc id's (to be fixed)
	* morituri/test/test_image_cue.py:
	  Update for having the table already with absolute values.
	* morituri/test/test_image_toc.py:
	  Add Ladyhawke CDDB test, it has a data track.
This commit is contained in:
Thomas Vander Stichele
2009-05-16 19:09:27 +00:00
parent 2f43fe3a33
commit 483c7b8a0c
7 changed files with 147 additions and 27 deletions

View File

@@ -202,7 +202,8 @@ class CDRDAOTask(task.Task):
bufsize=bufsize,
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, close_fds=True)
self.debug('Started cdrdao with pid %d', self._popen.pid)
self.debug('Started cdrdao with pid %d and options %r',
self._popen.pid, self.options)
self.runner.schedule(1.0, self._read, runner)
@@ -269,7 +270,8 @@ class ReadTableTask(CDRDAOTask):
os.close(fd)
os.unlink(self._tocfilepath)
self.options = ['read-toc', self._tocfilepath]
self.options = ['read-toc', '--session', '9',
self._tocfilepath, ]
def readbytes(self, bytes):
self.parser.read(bytes)
@@ -318,7 +320,10 @@ class ReadTOCTask(CDRDAOTask):
os.close(fd)
os.unlink(self._toc)
self.options = ['read-toc', '--fast-toc', self._toc]
# Reading a non-existent session gives you output for all sessions
# 9 should be a safe number
self.options = ['read-toc', '--fast-toc', '--session', '9',
self._toc, ]
def readbytes(self, bytes):
self.parser.read(bytes)