language2
This commit is contained in:
parent
7d527ba577
commit
5de33ef723
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