download parts and source

This commit is contained in:
j 2019-10-31 11:16:16 +01:00
commit ae2e3e45c6
10 changed files with 82 additions and 15 deletions

View file

@ -639,6 +639,9 @@ class Item(models.Model):
if self.poster_height:
i['posterRatio'] = self.poster_width / self.poster_height
if 'source' in keys:
i['source'] = self.files.filter(selected=True).exclude(data='').exists()
streams = self.streams()
i['durations'] = [s.duration for s in streams]
i['duration'] = sum(i['durations'])