From faa6b6ebaec8a638dda8c6485cf1e516ad5d7799 Mon Sep 17 00:00:00 2001 From: blacktwin Date: Tue, 13 Mar 2018 11:18:57 -0400 Subject: [PATCH] if recent_lst is empty check if recently added is null or not. If null then exit, nothing to notify. --- notify/notify_added_custom.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/notify/notify_added_custom.py b/notify/notify_added_custom.py index 5736f3b..eef1f88 100644 --- a/notify/notify_added_custom.py +++ b/notify/notify_added_custom.py @@ -197,7 +197,10 @@ def get_rating_keys(TODAY, LASTDATE): break start += count - return recent_lst + if recent_lst: + return recent_lst + sys.stderr.write("Recently Added list: {0}.".format(recent_lst)) + exit() def build_html(rating_key, height, width, pic_type):