From 8eda31aaca390a7ff68742dd18a0ae705e0a5d74 Mon Sep 17 00:00:00 2001 From: josdion Date: Sun, 29 Mar 2020 20:08:53 +0300 Subject: [PATCH] Use tmdbId as a key when updating table_movies if you delete a movie from radarr and then add it again, it will have the same tmdbId, but new radarrId. If this happens between two scans, bazarr won't be able to update the movie again. This fix should prevent this. --- bazarr/get_movies.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bazarr/get_movies.py b/bazarr/get_movies.py index e4f545c29..36dd63c39 100644 --- a/bazarr/get_movies.py +++ b/bazarr/get_movies.py @@ -231,8 +231,8 @@ def update_movies(): for updated_movie in movies_to_update_list: query = dict_converter.convert(updated_movie) - database.execute('''UPDATE table_movies SET ''' + query.keys_update + ''' WHERE radarrId = ?''', - query.values + (updated_movie['radarrId'],)) + database.execute('''UPDATE table_movies SET ''' + query.keys_update + ''' WHERE tmdbId = ?''', + query.values + (updated_movie['tmdbId'],)) altered_movies.append([updated_movie['tmdbId'], updated_movie['path'], updated_movie['radarrId'],