Skip to content

Commit

Permalink
notification changes: verbose flag now only affects the sending of sh…
Browse files Browse the repository at this point in the history
…ows/movies added, others are not considered verbose.
  • Loading branch information
l3uddz committed Mar 11, 2018
1 parent 5dcfffb commit 4a46153
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions traktarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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


Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 4a46153

Please sign in to comment.