diff --git a/README.md b/README.md index 100c2fa..5e7b2e0 100644 --- a/README.md +++ b/README.md @@ -112,14 +112,16 @@ Categories: - [x] Peertube upload - Support of all videos arguments (description, tags, category, licence, ...) - [x] description - - [x] tags + - [x] tags (no more than 30 characters per tag as Peertube does not support it) - [x] categories - [x] license: cca or not (Youtube only as Peertube uses Attribution by design) - [x] privacy (between public, unlisted or private) - [x] enabling/disabling comment (Peertube only as Youtube API does not support it) - [x] nsfw (Peertube only as Youtube API does not support it) + - [ ] set default language - ~~thumbnail/preview~~ Canceled, waiting for Youtube's API support - [x] Use a config file (NFO) file to retrieve videos arguments +- [ ] Allow to choose peertube or youtube upload (to resume failed upload for example) - [ ] Record and forget: put the video in a directory, and the script uploads it for you - [ ] Usable on Desktop (Linux and/or Windows and/or MacOS) - [ ] Graphical User Interface diff --git a/lib/pt_upload.py b/lib/pt_upload.py index f5f067f..05e22da 100644 --- a/lib/pt_upload.py +++ b/lib/pt_upload.py @@ -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'):