language2

This commit is contained in:
j 2011-08-06 14:10:54 +00:00
parent d6c17eba5b
commit 7b21ca9e43

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,