From 4f8ddb646753441ab0d53ca6bcb8ad3712c51edd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Sun, 20 Oct 2019 12:27:12 -0400 Subject: [PATCH] Fix for subtitles being download for unmonitored movies when added to Bazarr. --- bazarr/get_movies.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bazarr/get_movies.py b/bazarr/get_movies.py index d8a54f56b..483341f2c 100644 --- a/bazarr/get_movies.py +++ b/bazarr/get_movies.py @@ -243,7 +243,8 @@ def update_movies(): ).execute() altered_movies.append([updated_movie['tmdb_id'], updated_movie['path'], - updated_movie['radarr_id']]) + updated_movie['radarr_id'], + updated_movie['monitored']]) # Insert new movies in DB for added_movie in movies_to_add: @@ -252,7 +253,8 @@ def update_movies(): ).on_conflict_ignore().execute() altered_movies.append([added_movie['tmdb_id'], added_movie['path'], - added_movie['radarr_id']]) + added_movie['radarr_id'], + added_movie['monitored']]) # Remove old movies from DB removed_movies = list(set(current_movies_db_list) - set(current_movies_radarr)) @@ -274,7 +276,11 @@ def update_movies(): if len(altered_movies) <= 5: logging.debug("BAZARR No more than 5 movies were added during this sync then we'll search for subtitles.") for altered_movie in altered_movies: - movies_download_subtitles(altered_movie[2]) + if settings.radarr.getboolean('only_monitored'): + if altered_movie[3] == 'True': + movies_download_subtitles(altered_movie[2]) + else: + movies_download_subtitles(altered_movie[2]) else: logging.debug("BAZARR More than 5 movies were added during this sync then we wont search for subtitles.")