forked from 0x2620/pandora
fix default clips, should be full minute + 5, fixes #45
This commit is contained in:
parent
4aab40797d
commit
8313095e53
1 changed files with 2 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
||||||
from __future__ import division, with_statement
|
from __future__ import division, with_statement
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
import math
|
||||||
import os.path
|
import os.path
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
|
@ -1083,8 +1084,7 @@ class Item(models.Model):
|
||||||
annotation.save()
|
annotation.save()
|
||||||
#otherwise add empty 5 seconds annotation every minute
|
#otherwise add empty 5 seconds annotation every minute
|
||||||
if not subtitles_added:
|
if not subtitles_added:
|
||||||
i = offset
|
for i in range(int(math.ceil(offset)), int(offset + f.duration) - 5, 60):
|
||||||
while i < offset + f.duration - 5:
|
|
||||||
annotation = Annotation(
|
annotation = Annotation(
|
||||||
item=self,
|
item=self,
|
||||||
layer=layer,
|
layer=layer,
|
||||||
|
@ -1094,7 +1094,6 @@ class Item(models.Model):
|
||||||
user=user
|
user=user
|
||||||
)
|
)
|
||||||
annotation.save()
|
annotation.save()
|
||||||
i += 60
|
|
||||||
offset += f.duration
|
offset += f.duration
|
||||||
self.update_find()
|
self.update_find()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue