play_lst check

check if play_lst returned anything, if not then just exit.
This commit is contained in:
blacktwin 2018-03-19 09:18:33 -04:00 committed by Blacktwin
parent ee73a93fdc
commit 6e07432ef9

View File

@ -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
if play_lst:
plex.createPlaylist(TODAY_PLAY_TITLE, play_lst)
else:
print('Found nothing aired on this day in history.')