From 42a20308f02c3b2a7bac03c0d4af4f057d610d60 Mon Sep 17 00:00:00 2001 From: LecygneNoir Date: Sun, 11 Aug 2019 11:05:07 +0200 Subject: [PATCH] Exit the upload when failing to add video to a playlist on Youtube, to be more consistent with Peertube, fix #33 --- lib/yt_upload.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/yt_upload.py b/lib/yt_upload.py index 9093acd..8c726c3 100644 --- a/lib/yt_upload.py +++ b/lib/yt_upload.py @@ -252,8 +252,10 @@ def set_playlist(youtube, playlist_id, video_id): except Exception as e: if hasattr(e, 'message'): logging.error("Youtube: Error: " + str(e.message)) + exit(1) else: logging.error("Youtube: Error: " + str(e)) + exit(1) logging.info('Youtube: Video is correctly added to the playlist.')