add parts
This commit is contained in:
parent
f3431fa000
commit
2140a55cbf
1 changed files with 2 additions and 1 deletions
|
@ -433,7 +433,8 @@ class Item(models.Model):
|
||||||
streams = self.streams()
|
streams = self.streams()
|
||||||
i['durations'] = [s.duration for s in streams]
|
i['durations'] = [s.duration for s in streams]
|
||||||
i['duration'] = sum(i['durations'])
|
i['duration'] = sum(i['durations'])
|
||||||
if streams:
|
i['parts'] = len(i['durations'])
|
||||||
|
if i['parts']:
|
||||||
i['videoRatio'] = streams[0].aspect_ratio
|
i['videoRatio'] = streams[0].aspect_ratio
|
||||||
|
|
||||||
#only needed by admins
|
#only needed by admins
|
||||||
|
|
Loading…
Reference in a new issue