mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-11 09:17:47 +08:00
fix "Show Only Desired Languages" for movies without selected languages
This commit is contained in:
parent
197b84c36e
commit
3e4a75aeca
1 changed files with 4 additions and 2 deletions
|
@ -719,8 +719,10 @@ class Movies(Resource):
|
|||
"forced": True if len(language) > 1 else False}
|
||||
|
||||
if settings.general.getboolean('embedded_subs_show_desired'):
|
||||
item['subtitles'] = [x for x in item['subtitles'] if
|
||||
x['code2'] in [y['code2'] for y in item['languages']] or x['path']]
|
||||
desired_lang_list = []
|
||||
if item['languages'] and item['languages'] != 'None':
|
||||
desired_lang_list = [x['code2'] for x in item['languages']]
|
||||
item['subtitles'] = [x for x in item['subtitles'] if x['code2'] in desired_lang_list or x['path']]
|
||||
|
||||
item['subtitles'] = sorted(item['subtitles'], key=itemgetter('name', 'forced'))
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue