mirror of
https://git.lecygnenoir.info/LecygneNoir/prismedia.git
synced 2025-10-03 17:39:16 +02:00
Merge branch 'hotfix/v0.6.4' into develop
This commit is contained in:
commit
b21317ec7e
3 changed files with 12 additions and 4 deletions
|
@ -1,5 +1,11 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v0.6.4
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- Fix #33, no more trying to add a video into a playlist when the playlist does not exist on Youtube
|
||||||
|
- fix #39, patch the playlist name check when playlist contains special chars
|
||||||
|
|
||||||
## v0.6.3
|
## v0.6.3
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
|
|
@ -156,8 +156,8 @@ def initialize_upload(youtube, options):
|
||||||
if video_id and options.get('--thumbnail'):
|
if video_id and options.get('--thumbnail'):
|
||||||
set_thumbnail(youtube, options.get('--thumbnail'), videoId=video_id)
|
set_thumbnail(youtube, options.get('--thumbnail'), videoId=video_id)
|
||||||
|
|
||||||
# If we get a video_id, upload is successful and we are able to set playlist
|
# If we get a video_id and a playlist_id, upload is successful and we are able to set playlist
|
||||||
if video_id and options.get('--playlist'):
|
if video_id and playlist_id != "":
|
||||||
set_playlist(youtube, playlist_id, video_id)
|
set_playlist(youtube, playlist_id, video_id)
|
||||||
|
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ def get_playlist_by_name(youtube, playlist_name):
|
||||||
maxResults=50
|
maxResults=50
|
||||||
).execute()
|
).execute()
|
||||||
for playlist in response["items"]:
|
for playlist in response["items"]:
|
||||||
if playlist["snippet"]['title'] == playlist_name:
|
if playlist["snippet"]['title'].encode('utf8') == str(playlist_name):
|
||||||
return playlist['id']
|
return playlist['id']
|
||||||
|
|
||||||
|
|
||||||
|
@ -252,8 +252,10 @@ def set_playlist(youtube, playlist_id, video_id):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if hasattr(e, 'message'):
|
if hasattr(e, 'message'):
|
||||||
logging.error("Youtube: Error: " + str(e.message))
|
logging.error("Youtube: Error: " + str(e.message))
|
||||||
|
exit(1)
|
||||||
else:
|
else:
|
||||||
logging.error("Youtube: Error: " + str(e))
|
logging.error("Youtube: Error: " + str(e))
|
||||||
|
exit(1)
|
||||||
logging.info('Youtube: Video is correctly added to the playlist.')
|
logging.info('Youtube: Video is correctly added to the playlist.')
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ except ImportError:
|
||||||
'see https://github.com/ahupp/python-magic\n')
|
'see https://github.com/ahupp/python-magic\n')
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
VERSION = "prismedia v0.6.3"
|
VERSION = "prismedia v0.6.4"
|
||||||
|
|
||||||
VALID_PRIVACY_STATUSES = ('public', 'private', 'unlisted')
|
VALID_PRIVACY_STATUSES = ('public', 'private', 'unlisted')
|
||||||
VALID_CATEGORIES = (
|
VALID_CATEGORIES = (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue