1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-27 01:57:33 +00:00

Fix for missing subtitles management after implementing HI.

This commit is contained in:
Louis Vézina 2020-09-13 09:00:36 -04:00
parent 4c19622456
commit 23c25bd68f

View file

@ -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: