fix subtitles

This commit is contained in:
j 2008-08-16 23:04:52 +02:00
parent 1d56b8bc4b
commit cf1aef1611

View file

@ -449,8 +449,8 @@ class ArchiveFile(SQLObject):
def _startPoints(self): def _startPoints(self):
inpoints = [] inpoints = []
if self.srt: if self.srt:
d = subtitles.Subtitle(self.srt) d = subtitles.Subtitle(srt=self.srt)
for s in d: for s in d.values():
inpoints.append(s['in']) inpoints.append(s['in'])
elif self.length: elif self.length:
minutes = int((float(self.length) / 1000) / 60) minutes = int((float(self.length) / 1000) / 60)
@ -460,8 +460,8 @@ class ArchiveFile(SQLObject):
def _findSubtitleByInPoint(self, inpoint): def _findSubtitleByInPoint(self, inpoint):
if self.srt: if self.srt:
d = subtitles.Subtitle(self.srt) d = subtitles.Subtitle(srt=self.srt)
for s in d: for s in d.values():
if s['in'] == inpoint: if s['in'] == inpoint:
return s return s
return None return None