From 070e05de0bd8f3228f4d818fe7c15ebabb941faf Mon Sep 17 00:00:00 2001 From: LecygneNoir Date: Sun, 11 Aug 2019 11:03:36 +0200 Subject: [PATCH] Correctly check if a playlist has been created on Youtube before trying to add an uploaded video to it, cf #33 --- lib/yt_upload.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/yt_upload.py b/lib/yt_upload.py index 27dd298..9093acd 100644 --- a/lib/yt_upload.py +++ b/lib/yt_upload.py @@ -156,8 +156,8 @@ def initialize_upload(youtube, options): if video_id and options.get('--thumbnail'): set_thumbnail(youtube, options.get('--thumbnail'), videoId=video_id) - # If we get a video_id, upload is successful and we are able to set playlist - if video_id and options.get('--playlist'): + # If we get a video_id and a playlist_id, upload is successful and we are able to set playlist + if video_id and playlist_id != "": set_playlist(youtube, playlist_id, video_id)