Define channelId property beforehand
This commit is contained in:
parent
c01cfce40b
commit
26b4151762
1 changed files with 2 additions and 5 deletions
|
@ -106,9 +106,10 @@ async function run () {
|
|||
|
||||
console.log('Uploading %s video...', program[ 'videoName' ])
|
||||
|
||||
let videoAttributes:any = {
|
||||
const videoAttributes = {
|
||||
name: program['videoName'],
|
||||
category: program['category'],
|
||||
channelId: program['channelId'],
|
||||
licence: program['licence'],
|
||||
language: program['language'],
|
||||
nsfw: program['nsfw'],
|
||||
|
@ -123,10 +124,6 @@ async function run () {
|
|||
support: undefined
|
||||
}
|
||||
|
||||
if (program['channelId']) {
|
||||
videoAttributes.channelId = program['channelId']
|
||||
}
|
||||
|
||||
await uploadVideo(program[ 'url' ], accessToken, videoAttributes)
|
||||
|
||||
console.log(`Video ${program['videoName']} uploaded.`)
|
||||
|
|
Loading…
Reference in a new issue