language2

This commit is contained in:
j 2011-08-06 14:10:54 +00:00
parent 7d527ba577
commit 5de33ef723

View file

@ -45,8 +45,10 @@ def load_subtitles(itemId):
languages = [f.language for f in item.files.filter(is_main=True, is_subtitle=True,
available=True)]
if languages:
if 'en' in languages or '' in languages:
if 'en' in languages:
language = 'en'
elif '' in languages:
language = ''
else:
language = languages[0]
for f in item.files.filter(is_main=True, is_subtitle=True,