From 3b9d51670974aae6c637f29fe29d25e309300855 Mon Sep 17 00:00:00 2001 From: l3uddz Date: Sun, 11 Mar 2018 10:19:07 +0000 Subject: [PATCH] notification changes: verbose flag now only affects the sending of shows/movies added, others are not considered verbose. --- traktarr.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/traktarr.py b/traktarr.py index 9418b16..5cc9063 100644 --- a/traktarr.py +++ b/traktarr.py @@ -176,6 +176,11 @@ def shows(list_type, add_limit=0, add_delay=2.5, no_search=False, notifications= log.exception("Exception while processing show %s: ", series['show']['title']) log.info("Added %d new show(s) to Sonarr", added_shows) + + # send notification + if notifications: + notify.send(message="Added %d shows from Trakt's %s list" % (added_shows, list_type)) + return added_shows @@ -310,6 +315,11 @@ def movies(list_type, add_limit=0, add_delay=2.5, no_search=False, notifications log.exception("Exception while processing movie %s: ", movie['movie']['title']) log.info("Added %d new movie(s) to Radarr", added_movies) + + # send notification + if notifications: + notify.send(message="Added %d movies from Trakt's %s list" % (added_movies, list_type)) + return added_movies @@ -363,10 +373,6 @@ def automatic_shows(add_delay=2.5, no_search=False, notifications=False): continue total_shows_added += added_shows - # send notification - if notifications and not cfg.notifications.verbose: - notify.send(message="Added %d shows from Trakt's %s list" % (added_shows, list_type)) - # sleep time.sleep(10) @@ -404,10 +410,6 @@ def automatic_movies(add_delay=2.5, no_search=False, notifications=False): continue total_movies_added += added_movies - # send notification - if notifications and not cfg.notifications.verbose: - notify.send(message="Added %d movies from Trakt's %s list" % (added_movies, list_type)) - # sleep time.sleep(10)