plan video only if video has been uploaded with success

This commit is contained in:
LecygneNoir 2018-05-08 14:42:32 +02:00
parent 677e4eea5f
commit 28f964bf2e

View file

@ -123,14 +123,13 @@ def upload_video(oauth, secret, options):
template = ('Peertube : Video was successfully uploaded.\n' template = ('Peertube : Video was successfully uploaded.\n'
'Watch it at %s/videos/watch/%s.') 'Watch it at %s/videos/watch/%s.')
logging.info(template % (url, uuid)) logging.info(template % (url, uuid))
if options.get('--publishAt'):
utils.publishAt(str(options.get('--publishAt')), oauth, url, idvideo, secret)
else: else:
logging.error(('Peertube : The upload failed with an unexpected response: ' logging.error(('Peertube : The upload failed with an unexpected response: '
'%s') % response) '%s') % response)
exit(1) exit(1)
if options.get('--publishAt'):
utils.publishAt(str(options.get('--publishAt')), oauth, url, idvideo)
def run(options): def run(options):
secret = RawConfigParser() secret = RawConfigParser()