From 1271ccea18c63088e79f32cd1f52b30105a675e5 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Sun, 3 Mar 2013 23:15:44 +0100 Subject: [PATCH] Set start and length properly on File --- morituri/image/toc.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/morituri/image/toc.py b/morituri/image/toc.py index 7e19775..4190324 100644 --- a/morituri/image/toc.py +++ b/morituri/image/toc.py @@ -239,7 +239,8 @@ class TocFile(object, log.Loggable): self.debug('track %d, switched to new FILE, ' 'increased counter to %d', trackNumber, counter) - currentFile = File(filePath, start, length) + currentFile = File(filePath, common.msfToFrames(start), + common.msfToFrames(length)) #absoluteOffset += common.msfToFrames(start) currentLength += common.msfToFrames(length) @@ -258,7 +259,7 @@ class TocFile(object, log.Loggable): 'increased counter to %d', trackNumber, counter) # FIXME: assume that a MODE2_FORM_MIX track always starts at 0 - currentFile = File(filePath, 0, length) + currentFile = File(filePath, 0, common.msfToFrames(length)) #absoluteOffset += common.msfToFrames(start) currentLength += common.msfToFrames(length) @@ -353,13 +354,16 @@ class File: def __init__(self, path, start, length): """ - @type path: unicode + @type path: C{unicode} + @type start: C{int} + @param start: starting point for the track in this file, in frames + @param length: length for the track in this file, in frames """ assert type(path) is unicode, "%r is not unicode" % path self.path = path - #self.start = start - #self.length = length + self.start = start + self.length = length def __repr__(self): return '' % (self.path, )