dont include empty audioTracks array, fixes player view for items without audio tracks
This commit is contained in:
parent
f7e1749277
commit
a520b7edaf
1 changed files with 2 additions and 0 deletions
|
@ -605,6 +605,8 @@ class Item(models.Model):
|
|||
i['durations'] = [s.duration for s in streams]
|
||||
i['duration'] = sum(i['durations'])
|
||||
i['audioTracks'] = self.audio_tracks()
|
||||
if not i['audioTracks']:
|
||||
del i['audioTracks']
|
||||
if not streams:
|
||||
i['duration'] = self.files.filter(
|
||||
Q(selected=True)|Q(wanted=True)
|
||||
|
|
Loading…
Reference in a new issue