mirror of
https://git.lecygnenoir.info/LecygneNoir/prismedia.git
synced 2025-10-03 09:29:16 +02:00
Merge branch 'hotfix/v0.10.1'
This commit is contained in:
commit
bb451e108d
4 changed files with 12 additions and 8 deletions
|
@ -1,13 +1,18 @@
|
|||
# Changelog
|
||||
|
||||
## v0.10.1
|
||||
|
||||
### Fix
|
||||
- fix a bug introduced with v0.10.0 that broke thumbnail on youtube upload.
|
||||
|
||||
## v0.10.0
|
||||
|
||||
## Features
|
||||
### Features
|
||||
- Add the possibility to specify strict checks option to never forgot parameters when uploading (see #36)
|
||||
- Improve logging system, add options for batch upload and print url-only in the stdout (see #29)
|
||||
- --debug option is now deprecated in favor of --log=debug
|
||||
|
||||
## Fixes
|
||||
### Fixes
|
||||
- Workaround against the Youtube API breakdown while adding video in playlist. See #47 for details. Should be removed once Google fix their bugs.
|
||||
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ except ImportError:
|
|||
'see https://github.com/ahupp/python-magic\n')
|
||||
exit(1)
|
||||
|
||||
VERSION = "prismedia v0.10.0"
|
||||
VERSION = "prismedia v0.10.1"
|
||||
|
||||
VALID_PRIVACY_STATUSES = ('public', 'private', 'unlisted')
|
||||
VALID_CATEGORIES = (
|
||||
|
|
|
@ -158,7 +158,7 @@ def initialize_upload(youtube, options):
|
|||
|
||||
# If we get a video_id, upload is successful and we are able to set thumbnail
|
||||
if video_id and options.get('--thumbnail'):
|
||||
set_thumbnail(youtube, options.get('--thumbnail'), videoId=video_id)
|
||||
set_thumbnail(options, youtube, options.get('--thumbnail'), videoId=video_id)
|
||||
|
||||
# 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 != "":
|
||||
|
@ -229,7 +229,7 @@ def build_resource(properties):
|
|||
return resource
|
||||
|
||||
|
||||
def set_thumbnail(youtube, media_file, **kwargs):
|
||||
def set_thumbnail(options, youtube, media_file, **kwargs):
|
||||
kwargs = utils.remove_empty_kwargs(**kwargs)
|
||||
request = youtube.thumbnails().set(
|
||||
media_body=MediaFileUpload(media_file, chunksize=-1,
|
||||
|
@ -237,8 +237,7 @@ def set_thumbnail(youtube, media_file, **kwargs):
|
|||
**kwargs
|
||||
)
|
||||
|
||||
# See full sample for function
|
||||
return resumable_upload(request, 'thumbnail', 'set')
|
||||
return resumable_upload(request, 'thumbnail', 'set', options)
|
||||
|
||||
|
||||
def set_playlist(youtube, playlist_id, video_id):
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[tool.poetry]
|
||||
name = "prismedia"
|
||||
version = "0.10.0"
|
||||
version = "0.10.1"
|
||||
description = "scripting your way to upload videos on peertube and youtube"
|
||||
authors = [
|
||||
"LecygneNoir <git@lecygnenoir.info>",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue