forked from 0x2620/pandora
pass 0 instead of None
This commit is contained in:
parent
d263c4c7f0
commit
62ffbca208
2 changed files with 3 additions and 1 deletions
|
@ -1135,7 +1135,7 @@ class Item(models.Model):
|
|||
offset = 0
|
||||
streams = self.streams()
|
||||
for stream in streams:
|
||||
if stream.duration + offset < float(position):
|
||||
if stream.duration + offset < position:
|
||||
offset += stream.duration
|
||||
else:
|
||||
if not stream.file.is_video or not stream.file.info.get('video'):
|
||||
|
|
|
@ -777,6 +777,8 @@ def frame(request, id, size, position=None):
|
|||
position = frames[int(position)]['position']
|
||||
elif item.poster_frame == -1 and item.sort.duration:
|
||||
position = item.sort.duration/2
|
||||
else:
|
||||
position = 0
|
||||
else:
|
||||
position = item.poster_frame
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue