From fc8c024a1b1b1e439ef8f5b34513033920852b82 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 11 Jun 2019 10:39:30 +0200 Subject: Fix upload script --- shared/extra-utils/videos/videos.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'shared') diff --git a/shared/extra-utils/videos/videos.ts b/shared/extra-utils/videos/videos.ts index debaaf9a7..c78563232 100644 --- a/shared/extra-utils/videos/videos.ts +++ b/shared/extra-utils/videos/videos.ts @@ -355,7 +355,6 @@ async function uploadVideo (url: string, accessToken: string, videoAttributesArg .set('Accept', 'application/json') .set('Authorization', 'Bearer ' + accessToken) .field('name', attributes.name) - .field('support', attributes.support) .field('nsfw', JSON.stringify(attributes.nsfw)) .field('commentsEnabled', JSON.stringify(attributes.commentsEnabled)) .field('downloadEnabled', JSON.stringify(attributes.downloadEnabled)) @@ -363,6 +362,10 @@ async function uploadVideo (url: string, accessToken: string, videoAttributesArg .field('privacy', attributes.privacy.toString()) .field('channelId', attributes.channelId) + if (attributes.support !== undefined) { + req.field('support', attributes.support) + } + if (attributes.description !== undefined) { req.field('description', attributes.description) } -- cgit v1.2.3