forked from 0x2620/pandora
duration might not be set
This commit is contained in:
parent
c3b4a622ad
commit
3476a50c53
1 changed files with 1 additions and 1 deletions
|
@ -1352,7 +1352,7 @@ class Item(models.Model):
|
||||||
})
|
})
|
||||||
offset += f.duration
|
offset += f.duration
|
||||||
else:
|
else:
|
||||||
if 'videoRatio' in self.json:
|
if 'videoRatio' in self.json and self.sort.duration:
|
||||||
width, height = self.json['resolution']
|
width, height = self.json['resolution']
|
||||||
pos = self.sort.duration / 2
|
pos = self.sort.duration / 2
|
||||||
for p in map(int, [pos/2, pos, pos+pos/2]):
|
for p in map(int, [pos/2, pos, pos+pos/2]):
|
||||||
|
|
Loading…
Reference in a new issue