|
|
@ -209,14 +209,21 @@ def upload_video(oauth, secret, options): |
|
|
|
|
|
|
|
if options.get('--tags'): |
|
|
|
tags = options.get('--tags').split(',') |
|
|
|
tag_number = 0 |
|
|
|
for strtag in tags: |
|
|
|
tag_number = tag_number + 1 |
|
|
|
# Empty tag crashes Peertube, so skip them |
|
|
|
if strtag == "": |
|
|
|
continue |
|
|
|
# Tag more than 30 chars crashes Peertube, so exit and check tags |
|
|
|
# Tag more than 30 chars crashes Peertube, so skip tags |
|
|
|
if len(strtag) >= 30: |
|
|
|
logger.error("Peertube: Sorry, Peertube does not support tag with more than 30 characters, please reduce tag: " + strtag) |
|
|
|
logger.error("Peertube: Meanwhile, this tag will be skipped") |
|
|
|
logger.warning("Peertube: Sorry, Peertube does not support tag with more than 30 characters, please reduce tag: " + strtag) |
|
|
|
logger.warning("Peertube: Meanwhile, this tag will be skipped") |
|
|
|
continue |
|
|
|
# Peertube supports only 5 tags at the moment |
|
|
|
if tag_number > 5: |
|
|
|
logger.warning("Peertube: Sorry, Peertube support 5 tags max, additional tag will be skipped") |
|
|
|
logger.warning("Peertube: Skipping tag " + strtag) |
|
|
|
continue |
|
|
|
fields.append(("tags[]", strtag)) |
|
|
|
|
|
|
|