From 6e07432ef9d3b4d29dfd5d733aa3ae983f2f89f6 Mon Sep 17 00:00:00 2001 From: blacktwin Date: Mon, 19 Mar 2018 09:18:33 -0400 Subject: [PATCH] play_lst check check if play_lst returned anything, if not then just exit. --- fun/aired_today_playlist.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fun/aired_today_playlist.py b/fun/aired_today_playlist.py index b97935b..79c18bf 100644 --- a/fun/aired_today_playlist.py +++ b/fun/aired_today_playlist.py @@ -66,7 +66,11 @@ def find_air_dates(content_lst): play_lst = [x[0] for x in aired_lst] return play_lst + remove_old() play_lst = find_air_dates(get_all_content(LIBRARY_NAMES)) # Create Playlist -plex.createPlaylist(TODAY_PLAY_TITLE, play_lst) +if play_lst: + plex.createPlaylist(TODAY_PLAY_TITLE, play_lst) +else: + print('Found nothing aired on this day in history.')