mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-25 09:12:38 +00:00
Apply cutoff even if the desired subtitles language is ignored because of a matching audio track.
This commit is contained in:
parent
9398789fb7
commit
74a2ada6c9
1 changed files with 16 additions and 2 deletions
|
@ -266,7 +266,14 @@ def list_missing_subtitles(no=None, epno=None, send_event=True):
|
|||
if desired_subtitles_temp:
|
||||
for language in ast.literal_eval(desired_subtitles_temp['items']):
|
||||
if language['audio_exclude'] == "True":
|
||||
if language_from_alpha2(language['language']) in ast.literal_eval(episode_subtitles['audio_language']):
|
||||
cutoff_lang_temp = get_profile_cutoff(profile_id=episode_subtitles['profileId'])
|
||||
if cutoff_lang_temp:
|
||||
if language_from_alpha2(cutoff_lang_temp[0]['language']) in ast.literal_eval(
|
||||
episode_subtitles['audio_language']):
|
||||
desired_subtitles_list = []
|
||||
break
|
||||
if language_from_alpha2(language['language']) in ast.literal_eval(
|
||||
episode_subtitles['audio_language']):
|
||||
continue
|
||||
desired_subtitles_list.append([language['language'], language['forced'], language['hi']])
|
||||
|
||||
|
@ -371,7 +378,14 @@ def list_missing_subtitles_movies(no=None, epno=None, send_event=True):
|
|||
if desired_subtitles_temp:
|
||||
for language in ast.literal_eval(desired_subtitles_temp['items']):
|
||||
if language['audio_exclude'] == "True":
|
||||
if language_from_alpha2(language['language']) in ast.literal_eval(movie_subtitles['audio_language']):
|
||||
cutoff_lang_temp = get_profile_cutoff(profile_id=movie_subtitles['profileId'])
|
||||
if cutoff_lang_temp:
|
||||
if language_from_alpha2(cutoff_lang_temp[0]['language']) in ast.literal_eval(
|
||||
movie_subtitles['audio_language']):
|
||||
desired_subtitles_list = []
|
||||
break
|
||||
if language_from_alpha2(language['language']) in ast.literal_eval(
|
||||
movie_subtitles['audio_language']):
|
||||
continue
|
||||
desired_subtitles_list.append([language['language'], language['forced'], language['hi']])
|
||||
|
||||
|
|
Loading…
Reference in a new issue