.option('-P, --privacy <privacy_number>', 'Privacy')
.option('-N, --nsfw', 'Video is Not Safe For Work')
.option('-c, --category <category_number>', 'Category number')
+ .option('-C, --channel-id <channel_id>', 'Channel ID')
.option('-m, --comments-enabled', 'Enable comments')
.option('-l, --licence <licence_number>', 'Licence number')
.option('-L, --language <language_code>', 'Language ISO 639 code (fr or en...)')
console.log('Uploading %s video...', program[ 'videoName' ])
- const videoAttributes = {
+ let videoAttributes:any = {
name: program['videoName'],
category: program['category'],
licence: program['licence'],
support: undefined
}
+ if (program['channelId']) {
+ videoAttributes.channelId = program['channelId']
+ }
+
await uploadVideo(program[ 'url' ], accessToken, videoAttributes)
console.log(`Video ${program['videoName']} uploaded.`)