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