only look at media files for languages

This commit is contained in:
j 2014-10-06 14:51:53 +02:00
parent 93964086ea
commit f97acf8e2f

View file

@ -1243,7 +1243,7 @@ class Item(models.Model):
self.save() self.save()
def audio_tracks(self): def audio_tracks(self):
tracks = [f['language'] for f in self.files.filter(selected=True).values('language') if f['language']] tracks = [f['language'] for f in self.files.filter(selected=True).filter(Q(is_video=True)|Q(is_audio=True)).values('language') if f['language']]
return sorted(set(tracks)) return sorted(set(tracks))
def streams(self, track=None): def streams(self, track=None):