mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-26 09:37:25 +00:00
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.
This commit is contained in:
parent
299af38486
commit
8eda31aaca
1 changed files with 2 additions and 2 deletions
|
@ -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'],
|
||||
|
|
Loading…
Reference in a new issue