Set start and length properly on File

This commit is contained in:
Thomas Vander Stichele
2013-03-03 23:15:44 +01:00
parent 879dd7f946
commit 1271ccea18

View File

@@ -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 '<File %r>' % (self.path, )