position is float

This commit is contained in:
j 2017-03-11 20:56:37 +02:00
parent 3a6bfa8946
commit d263c4c7f0

View file

@ -1135,7 +1135,7 @@ class Item(models.Model):
offset = 0 offset = 0
streams = self.streams() streams = self.streams()
for stream in streams: for stream in streams:
if stream.duration + offset < position: if stream.duration + offset < float(position):
offset += stream.duration offset += stream.duration
else: else:
if not stream.file.is_video or not stream.file.info.get('video'): if not stream.file.is_video or not stream.file.info.get('video'):