diff --git a/server/tools/peertube-upload.ts b/server/tools/peertube-upload.ts index 4034b7e38..6248fb47d 100644 --- a/server/tools/peertube-upload.ts +++ b/server/tools/peertube-upload.ts @@ -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.`)