mirror of
https://git.lecygnenoir.info/LecygneNoir/prismedia.git
synced 2025-10-06 02:29:58 +02:00
Fix 409 conflict in Peertube when a playlist with same name already exists (#20)
This commit is contained in:
parent
097ff965bb
commit
9426ca465c
1 changed files with 5 additions and 0 deletions
|
@ -88,6 +88,11 @@ def create_playlist(oauth, url, options):
|
||||||
jresponse = response.json()
|
jresponse = response.json()
|
||||||
jresponse = jresponse['videoChannel']
|
jresponse = jresponse['videoChannel']
|
||||||
return jresponse['id']
|
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:
|
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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue