summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJayZed <[email protected]>2024-03-04 22:53:30 -0500
committerGitHub <[email protected]>2024-03-04 22:53:30 -0500
commit345b6b37185a4b04534ac53eb5f7294f1937ea3a (patch)
treecea13ceabf899134330f57bf00536e55d6688f7a
parent33f82fe44568888b086dbda128f3b230a189a1e7 (diff)
downloadbazarr-345b6b37185a4b04534ac53eb5f7294f1937ea3a.tar.gz
bazarr-345b6b37185a4b04534ac53eb5f7294f1937ea3a.zip
Fixed unbound local variable if 0 movies in database. #2417
-rw-r--r--bazarr/radarr/sync/movies.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bazarr/radarr/sync/movies.py b/bazarr/radarr/sync/movies.py
index ad98c4a12..82416cffb 100644
--- a/bazarr/radarr/sync/movies.py
+++ b/bazarr/radarr/sync/movies.py
@@ -197,14 +197,14 @@ def update_movies(send_event=True):
if send_event:
hide_progress(id='movies_progress')
- trace(f"Skipped {files_missing} file missing movies out of {i}")
+ trace(f"Skipped {files_missing} file missing movies out of {movies_count}")
if sync_monitored:
- trace(f"Skipped {skipped_count} unmonitored movies out of {i}")
- trace(f"Processed {i - files_missing - skipped_count} movies out of {i} "
+ trace(f"Skipped {skipped_count} unmonitored movies out of {movies_count}")
+ trace(f"Processed {movies_count - files_missing - skipped_count} movies out of {movies_count} "
f"with {len(movies_added)} added, {len(movies_updated)} updated and "
f"{len(movies_deleted)} deleted")
else:
- trace(f"Processed {i - files_missing} movies out of {i} with {len(movies_added)} added and "
+ trace(f"Processed {movies_count - files_missing} movies out of {movies_count} with {len(movies_added)} added and "
f"{len(movies_updated)} updated")
logging.debug('BAZARR All movies synced from Radarr into database.')