diff --git a/pandora/archive/models.py b/pandora/archive/models.py index d8ac6c45..858eab17 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -279,7 +279,13 @@ class File(models.Model): return None def srt(self, offset=0): - srt = ox.srt.load(self.data.path) + srt = [] + subtitles = [] + for s in ox.srt.load(self.data.path): + key = '%s --> %s\n%s' % (s['in'], s['out'], s['value']) + if key not in subtitles: + subtitles.append(key) + srt.append(s) #subtitles should not overlap for i in range(1, len(srt)): if srt[i-1]['out'] > srt[i]['in']: