mirror of
https://git.lecygnenoir.info/LecygneNoir/prismedia.git
synced 2025-10-03 09:29:16 +02:00
add possibility to choose license cca for Youtube
This commit is contained in:
parent
ac91e9b918
commit
c8efa820ff
5 changed files with 17 additions and 4 deletions
|
@ -81,6 +81,10 @@ def initialize_upload(youtube, options):
|
|||
if options.get('--category'):
|
||||
category = utils.getCategory(options.get('--category'), 'youtube')
|
||||
|
||||
license = None
|
||||
if options.get('--cca'):
|
||||
license = "creativeCommon"
|
||||
|
||||
body = {
|
||||
"snippet": {
|
||||
"title": options.get('--name') or splitext(basename(path))[0],
|
||||
|
@ -89,7 +93,10 @@ def initialize_upload(youtube, options):
|
|||
#if no category, set default to 1 (Films)
|
||||
"categoryId": str(category or 1),
|
||||
},
|
||||
"status": {"privacyStatus": str(options.get('--privacy') or "private")}
|
||||
"status": {
|
||||
"privacyStatus": str(options.get('--privacy') or "private"),
|
||||
"license": str(license or "youtube")
|
||||
}
|
||||
}
|
||||
|
||||
# Call the API's videos.insert method to create and upload the video.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue