forked from 0x2620/pandora
ignore subtitles that are longer than the video.
This commit is contained in:
parent
abf445b7f1
commit
d39c237b04
1 changed files with 12 additions and 9 deletions
|
@ -1569,6 +1569,9 @@ class Item(models.Model):
|
|||
for data in s.srt(offset):
|
||||
subtitles_added = True
|
||||
value = data['value'].replace('\n', '<br>\n').replace('<br><br>\n', '<br>\n')
|
||||
if data['in'] < self.json['duration'] and data['out'] > self.json['duration']:
|
||||
data['out'] = self.json['duration']
|
||||
if data['in'] < self.json['duration']:
|
||||
annotation = Annotation(
|
||||
item=self,
|
||||
layer=layer,
|
||||
|
|
Loading…
Reference in a new issue