1
0
Fork 0

Define channelId property beforehand

This commit is contained in:
Andrew Morgan 2018-09-29 02:49:33 +02:00 committed by Chocobozzz
parent c01cfce40b
commit 26b4151762

View file

@ -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.`)