Browse Source

Merge branch 'hotfix/v0.6.4' into develop

pull/45/head
LecygneNoir 4 years ago
parent
commit
b21317ec7e
3 changed files with 12 additions and 4 deletions
  1. +6
    -0
      CHANGELOG.md
  2. +5
    -3
      lib/yt_upload.py
  3. +1
    -1
      prismedia_upload.py

+ 6
- 0
CHANGELOG.md View File

@ -1,5 +1,11 @@
# 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
### Fixes

+ 5
- 3
lib/yt_upload.py View File

@ -156,8 +156,8 @@ def initialize_upload(youtube, options):
if video_id and options.get('--thumbnail'):
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 video_id and options.get('--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 playlist_id != "":
set_playlist(youtube, playlist_id, video_id)
@ -168,7 +168,7 @@ def get_playlist_by_name(youtube, playlist_name):
maxResults=50
).execute()
for playlist in response["items"]:
if playlist["snippet"]['title'] == playlist_name:
if playlist["snippet"]['title'].encode('utf8') == str(playlist_name):
return playlist['id']
@ -252,8 +252,10 @@ def set_playlist(youtube, playlist_id, video_id):
except Exception as e:
if hasattr(e, 'message'):
logging.error("Youtube: Error: " + str(e.message))
exit(1)
else:
logging.error("Youtube: Error: " + str(e))
exit(1)
logging.info('Youtube: Video is correctly added to the playlist.')

+ 1
- 1
prismedia_upload.py View File

@ -92,7 +92,7 @@ except ImportError:
'see https://github.com/ahupp/python-magic\n')
exit(1)
VERSION = "prismedia v0.6.3"
VERSION = "prismedia v0.6.4"
VALID_PRIVACY_STATUSES = ('public', 'private', 'unlisted')
VALID_CATEGORIES = (

Loading…
Cancel
Save