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