forked from 0x2620/pandora
fix offset option in srt
This commit is contained in:
parent
18f8b1a1f4
commit
64376795ff
2 changed files with 8 additions and 1 deletions
|
@ -214,6 +214,13 @@ class File(models.Model):
|
|||
for i in range(1, len(srt)):
|
||||
if srt[i-1]['out'] > srt[i]['in']:
|
||||
srt[i-1]['out'] = srt[i]['in']
|
||||
|
||||
def shift(s):
|
||||
s['in'] += offset
|
||||
s['out'] += offset
|
||||
return s
|
||||
if offset:
|
||||
srt = map(shift, srt)
|
||||
return srt
|
||||
|
||||
def editable(self, user):
|
||||
|
|
Loading…
Reference in a new issue