language2
This commit is contained in:
parent
d6c17eba5b
commit
7b21ca9e43
1 changed files with 3 additions and 1 deletions
|
@ -45,8 +45,10 @@ def load_subtitles(itemId):
|
||||||
languages = [f.language for f in item.files.filter(is_main=True, is_subtitle=True,
|
languages = [f.language for f in item.files.filter(is_main=True, is_subtitle=True,
|
||||||
available=True)]
|
available=True)]
|
||||||
if languages:
|
if languages:
|
||||||
if 'en' in languages or '' in languages:
|
if 'en' in languages:
|
||||||
language = 'en'
|
language = 'en'
|
||||||
|
elif '' in languages:
|
||||||
|
language = ''
|
||||||
else:
|
else:
|
||||||
language = languages[0]
|
language = languages[0]
|
||||||
for f in item.files.filter(is_main=True, is_subtitle=True,
|
for f in item.files.filter(is_main=True, is_subtitle=True,
|
||||||
|
|
Loading…
Reference in a new issue