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 datetime import datetime
|
||||
import math
|
||||
import os.path
|
||||
import re
|
||||
import subprocess
|
||||
|
@ -1083,8 +1084,7 @@ class Item(models.Model):
|
|||
annotation.save()
|
||||
#otherwise add empty 5 seconds annotation every minute
|
||||
if not subtitles_added:
|
||||
i = offset
|
||||
while i < offset + f.duration - 5:
|
||||
for i in range(int(math.ceil(offset)), int(offset + f.duration) - 5, 60):
|
||||
annotation = Annotation(
|
||||
item=self,
|
||||
layer=layer,
|
||||
|
@ -1094,7 +1094,6 @@ class Item(models.Model):
|
|||
user=user
|
||||
)
|
||||
annotation.save()
|
||||
i += 60
|
||||
offset += f.duration
|
||||
self.update_find()
|
||||
|
||||
|
|
Loading…
Reference in a new issue