mirror of
https://git.lecygnenoir.info/LecygneNoir/prismedia.git
synced 2025-10-03 09:29:16 +02:00
Add some protection for tags (no empty tag, no tag with more than 30 chars)
This commit is contained in:
parent
6be996b9a3
commit
54beb8ee7e
2 changed files with 9 additions and 1 deletions
|
@ -69,6 +69,12 @@ def upload_video(oauth, secret, options):
|
|||
if options.get('--tags'):
|
||||
tags = options.get('--tags').split(',')
|
||||
for strtags in tags:
|
||||
# Empty tag crashes Peertube, so skip them
|
||||
if strtags == "":
|
||||
continue
|
||||
# Tag more than 30 chars crashes Peertube, so exit and check tags
|
||||
if len(strtags) >= 30:
|
||||
exit("Sorry, Peertube does not support tag with more than 30 characters, please reduce your tag size")
|
||||
fields.append(("tags", strtags))
|
||||
|
||||
if options.get('--category'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue