From 28f964bf2e2a319f9cd1d0d27c5a8c3cf90bb4be Mon Sep 17 00:00:00 2001 From: LecygneNoir Date: Tue, 8 May 2018 14:42:32 +0200 Subject: [PATCH] plan video only if video has been uploaded with success --- lib/pt_upload.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/pt_upload.py b/lib/pt_upload.py index ba55821..e30d1f4 100644 --- a/lib/pt_upload.py +++ b/lib/pt_upload.py @@ -123,14 +123,13 @@ def upload_video(oauth, secret, options): template = ('Peertube : Video was successfully uploaded.\n' 'Watch it at %s/videos/watch/%s.') logging.info(template % (url, uuid)) + if options.get('--publishAt'): + utils.publishAt(str(options.get('--publishAt')), oauth, url, idvideo, secret) else: logging.error(('Peertube : The upload failed with an unexpected response: ' '%s') % response) exit(1) - if options.get('--publishAt'): - utils.publishAt(str(options.get('--publishAt')), oauth, url, idvideo) - def run(options): secret = RawConfigParser()