1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-25 09:12:38 +00:00

Bug correction

This commit is contained in:
Louis Vézina 2017-11-04 21:20:27 -04:00
parent 55bf529419
commit 75a9059636

View file

@ -85,9 +85,12 @@ def list_missing_subtitles(*no):
actual_subtitles = ast.literal_eval(episode_subtitles[1]) actual_subtitles = ast.literal_eval(episode_subtitles[1])
desired_subtitles = ast.literal_eval(episode_subtitles[2]) desired_subtitles = ast.literal_eval(episode_subtitles[2])
actual_subtitles_list = [] actual_subtitles_list = []
for item in actual_subtitles: if desired_subtitles == None:
actual_subtitles_list.append(item[0]) missing_subtitles_global.append(tuple(['[]', episode_subtitles[0]]))
missing_subtitles = list(set(desired_subtitles) - set(actual_subtitles_list)) else:
for item in actual_subtitles:
actual_subtitles_list.append(item[0])
missing_subtitles = list(set(desired_subtitles) - set(actual_subtitles_list))
missing_subtitles_global.append(tuple([str(missing_subtitles), episode_subtitles[0]])) missing_subtitles_global.append(tuple([str(missing_subtitles), episode_subtitles[0]]))
c_db.executemany("UPDATE table_episodes SET missing_subtitles = ? WHERE sonarrEpisodeId = ?", (missing_subtitles_global)) c_db.executemany("UPDATE table_episodes SET missing_subtitles = ? WHERE sonarrEpisodeId = ?", (missing_subtitles_global))