[SCM] morituri/master: handle index 00 of track 1 specially
js at users.alioth.debian.org
js at users.alioth.debian.org
Sun Oct 19 20:10:11 UTC 2014
The following commit has been merged in the master branch:
commit 73a7056d85f8458791b9644570babfae60ccf948
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date: Sun Aug 18 21:58:17 2013 +0200
handle index 00 of track 1 specially
diff --git a/morituri/image/table.py b/morituri/image/table.py
index 9ea055c..79d1422 100644
--- a/morituri/image/table.py
+++ b/morituri/image/table.py
@@ -547,11 +547,19 @@ class Table(object, log.Loggable):
if key in self.cdtext:
lines.append('%s "%s"' % (key, self.cdtext[key]))
- # add the first FILE line
- path = self.tracks[0].getFirstIndex().path
- counter = self.tracks[0].getFirstIndex().counter
+ # add the first FILE line; EAC always puts the first FILE
+ # statement before TRACK 01
+ firstTrack = self.tracks[0]
+ indexOne = firstTrack.getIndex(1)
+
+ firstIndex = firstTrack.getFirstIndex()
+ path = indexOne.path
+ counter = indexOne.counter
+
+ assert path, "No path on TRACK 01 INDEX 01"
writeFile(path)
+
for i, track in enumerate(self.tracks):
# FIXME: skip data tracks for now
if not track.audio:
@@ -577,6 +585,14 @@ class Table(object, log.Loggable):
for number in indexes:
index = track.indexes[number]
+ # handle TRACK 01 INDEX 00 specially
+ if i == 0 and number == 0:
+ # if we have a silent pre-gap, output it
+ if not index.path:
+ length = indexOne.absolute - index.absolute
+ lines.append(" PREGAP %s" % common.framesToMSF(length))
+ continue
+
if index.counter != counter:
writeFile(index.path)
counter = index.counter
--
morituri packaging
More information about the pkg-multimedia-commits
mailing list