only use frames that are ready.
This commit is contained in:
parent
50a318f4ad
commit
999de04ad8
1 changed files with 7 additions and 6 deletions
|
@ -1380,12 +1380,13 @@ class Item(models.Model):
|
||||||
offset = 0
|
offset = 0
|
||||||
for f in self.files.filter(selected=True, is_video=True).order_by('sort_path'):
|
for f in self.files.filter(selected=True, is_video=True).order_by('sort_path'):
|
||||||
for ff in f.frames.all().order_by('position'):
|
for ff in f.frames.all().order_by('position'):
|
||||||
frames.append({
|
if ff.frame:
|
||||||
'position': offset + ff.position,
|
frames.append({
|
||||||
'path': ff.frame.path,
|
'position': offset + ff.position,
|
||||||
'width': ff.frame.width,
|
'path': ff.frame.path,
|
||||||
'height': ff.frame.height
|
'width': ff.frame.width,
|
||||||
})
|
'height': ff.frame.height
|
||||||
|
})
|
||||||
offset += f.duration
|
offset += f.duration
|
||||||
else:
|
else:
|
||||||
if 'videoRatio' in self.json and self.sort.duration:
|
if 'videoRatio' in self.json and self.sort.duration:
|
||||||
|
|
Loading…
Reference in a new issue