duration is stream duration not source video duration
This commit is contained in:
parent
954c68994e
commit
5df00a3c91
1 changed files with 2 additions and 1 deletions
|
@ -831,7 +831,8 @@ class Item(models.Model):
|
|||
s.numberoffiles = self.files.all().count()
|
||||
videos = self.files.filter(selected=True).filter(Q(is_video=True)|Q(is_audio=True))
|
||||
if videos.count() > 0:
|
||||
s.duration = sum([v.duration for v in videos])
|
||||
#s.duration = sum([v.duration for v in videos])
|
||||
s.duration = sum([s.duration for s in self.streams()])
|
||||
v = videos[0]
|
||||
if v.is_audio:
|
||||
s.resolution = None
|
||||
|
|
Loading…
Reference in a new issue