diff --git a/bazarr/list_subtitles.py b/bazarr/list_subtitles.py index 703bc49ac..719b9f83b 100644 --- a/bazarr/list_subtitles.py +++ b/bazarr/list_subtitles.py @@ -241,9 +241,11 @@ def list_missing_subtitles(no=None, epno=None, send_event=True): else: actual_subtitles_list.append(item[0]) missing_subtitles = list(set(desired_subtitles) - set(actual_subtitles_list)) + hi_subs_to_remove = [] for item in missing_subtitles: if item + ':hi' in actual_subtitles_list: - missing_subtitles.remove(item) + hi_subs_to_remove.append(item) + missing_subtitles = list(set(missing_subtitles) - set(hi_subs_to_remove)) missing_subtitles_global.append(tuple([str(missing_subtitles), episode_subtitles['sonarrEpisodeId'], episode_subtitles['sonarrSeriesId']])) @@ -315,10 +317,11 @@ def list_missing_subtitles_movies(no=None, send_event=True): else: actual_subtitles_list.append(item[0]) missing_subtitles = list(set(desired_subtitles) - set(actual_subtitles_list)) - if movie_subtitles['hearing_impaired'] == "False": - for item in missing_subtitles: - if item in actual_subtitles_list or (item + ':hi') in actual_subtitles_list: - missing_subtitles.remove(item) + hi_subs_to_remove = [] + for item in missing_subtitles: + if item + ':hi' in actual_subtitles_list: + hi_subs_to_remove.append(item) + missing_subtitles = list(set(missing_subtitles) - set(hi_subs_to_remove)) missing_subtitles_global.append(tuple([str(missing_subtitles), movie_subtitles['radarrId']])) for missing_subtitles_item in missing_subtitles_global: