summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2024-08-29 22:56:52 -0400
committermorpheus65535 <[email protected]>2024-08-29 22:56:52 -0400
commit5f7e1f68c706a2f71dca0ed8b6763416d51342bb (patch)
tree380a4fda600f66f5710af8731235feea793619bf
parent0fd635c72df39c8415f6aff338487de769aa101e (diff)
downloadbazarr-5f7e1f68c706a2f71dca0ed8b6763416d51342bb.tar.gz
bazarr-5f7e1f68c706a2f71dca0ed8b6763416d51342bb.zip
Fixed cutoff language not being properly handled. #2635v1.4.4-beta.38
-rw-r--r--bazarr/subtitles/indexer/movies.py9
-rw-r--r--bazarr/subtitles/indexer/series.py9
2 files changed, 14 insertions, 4 deletions
diff --git a/bazarr/subtitles/indexer/movies.py b/bazarr/subtitles/indexer/movies.py
index ba105efc3..563a68cff 100644
--- a/bazarr/subtitles/indexer/movies.py
+++ b/bazarr/subtitles/indexer/movies.py
@@ -216,7 +216,9 @@ def list_missing_subtitles_movies(no=None, send_event=True):
if cutoff_temp_list:
for cutoff_temp in cutoff_temp_list:
- cutoff_language = [cutoff_temp['language'], cutoff_temp['forced'], cutoff_temp['hi']]
+ cutoff_language = {'language': cutoff_temp['language'],
+ 'forced': cutoff_temp['forced'],
+ 'hi': cutoff_temp['hi']}
if cutoff_temp['audio_exclude'] == 'True' and \
any(x['code2'] == cutoff_temp['language'] for x in
get_audio_profile_languages(movie_subtitles.audio_language)):
@@ -224,7 +226,10 @@ def list_missing_subtitles_movies(no=None, send_event=True):
elif cutoff_language in actual_subtitles_list:
cutoff_met = True
# HI is considered as good as normal
- elif cutoff_language and [cutoff_language[0], 'False', 'True'] in actual_subtitles_list:
+ elif (cutoff_language and
+ {'language': cutoff_language['language'],
+ 'forced': 'False',
+ 'hi': 'True'} in actual_subtitles_list):
cutoff_met = True
if cutoff_met:
diff --git a/bazarr/subtitles/indexer/series.py b/bazarr/subtitles/indexer/series.py
index 6b8501dfe..64af2e4c3 100644
--- a/bazarr/subtitles/indexer/series.py
+++ b/bazarr/subtitles/indexer/series.py
@@ -216,7 +216,9 @@ def list_missing_subtitles(no=None, epno=None, send_event=True):
if cutoff_temp_list:
for cutoff_temp in cutoff_temp_list:
- cutoff_language = [cutoff_temp['language'], cutoff_temp['forced'], cutoff_temp['hi']]
+ cutoff_language = {'language': cutoff_temp['language'],
+ 'forced': cutoff_temp['forced'],
+ 'hi': cutoff_temp['hi']}
if cutoff_temp['audio_exclude'] == 'True' and \
any(x['code2'] == cutoff_temp['language'] for x in
get_audio_profile_languages(episode_subtitles.audio_language)):
@@ -224,7 +226,10 @@ def list_missing_subtitles(no=None, epno=None, send_event=True):
elif cutoff_language in actual_subtitles_list:
cutoff_met = True
# HI is considered as good as normal
- elif [cutoff_language[0], 'False', 'True'] in actual_subtitles_list:
+ elif (cutoff_language and
+ {'language': cutoff_language['language'],
+ 'forced': 'False',
+ 'hi': 'True'} in actual_subtitles_list):
cutoff_met = True
if cutoff_met: