From 9426ca465c750aa0c9abc386f7df63374f5e5e99 Mon Sep 17 00:00:00 2001 From: LecygneNoir Date: Sun, 28 Oct 2018 09:53:45 +0100 Subject: [PATCH 1/2] Fix 409 conflict in Peertube when a playlist with same name already exists (#20) --- lib/pt_upload.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/pt_upload.py b/lib/pt_upload.py index 2d4fbdf..d852e00 100644 --- a/lib/pt_upload.py +++ b/lib/pt_upload.py @@ -88,6 +88,11 @@ def create_playlist(oauth, url, options): jresponse = response.json() jresponse = jresponse['videoChannel'] return jresponse['id'] + if response.status_code == 409: + logging.error('Peertube: Error: It seems there is a conflict with an existing playlist, please beware ' + 'Peertube internal name is compiled from 20 firsts characters of playlist name.' + ' Please check your playlist name an retry.') + exit(1) else: logging.error(('Peertube: The upload failed with an unexpected response: ' '%s') % response) From 233818832566e4b4ea790695e51f26c297710c05 Mon Sep 17 00:00:00 2001 From: LecygneNoir Date: Sun, 28 Oct 2018 09:56:56 +0100 Subject: [PATCH 2/2] Add changelog and version for hotfix v0.6.1 --- CHANGELOG.md | 6 ++++++ prismedia_upload.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ad15df..324f507 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v0.6.1 + +### Fixes + - fix an error when playlists on Peertube have same names but not same display names (issue #20) + - fix an error where videos does not upload on Peertube when some characters are used in playlist(issue #19) + ## v0.6 ### Compatibility ### diff --git a/prismedia_upload.py b/prismedia_upload.py index c11f08b..a300c96 100755 --- a/prismedia_upload.py +++ b/prismedia_upload.py @@ -94,7 +94,7 @@ except ImportError: 'see https://github.com/ahupp/python-magic\n') exit(1) -VERSION = "prismedia v0.6" +VERSION = "prismedia v0.6.1" VALID_PRIVACY_STATUSES = ('public', 'private', 'unlisted') VALID_CATEGORIES = (