aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tools/cli.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tools/cli.ts')
-rw-r--r--server/tools/cli.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/tools/cli.ts b/server/tools/cli.ts
index 67755022c..8599a270f 100644
--- a/server/tools/cli.ts
+++ b/server/tools/cli.ts
@@ -121,7 +121,7 @@ function buildCommonVideoOptions (command: Command) {
121 .option('-w, --wait-transcoding', 'Wait transcoding before publishing the video') 121 .option('-w, --wait-transcoding', 'Wait transcoding before publishing the video')
122} 122}
123 123
124async function buildVideoAttributesFromCommander (url: string, command: Command, defaultAttributes: any) { 124async function buildVideoAttributesFromCommander (url: string, command: Command, defaultAttributes: any = {}) {
125 const defaultBooleanAttributes = { 125 const defaultBooleanAttributes = {
126 nsfw: false, 126 nsfw: false,
127 commentsEnabled: true, 127 commentsEnabled: true,
@@ -147,7 +147,9 @@ async function buildVideoAttributesFromCommander (url: string, command: Command,
147 licence: command[ 'licence' ] || defaultAttributes.licence || undefined, 147 licence: command[ 'licence' ] || defaultAttributes.licence || undefined,
148 language: command[ 'language' ] || defaultAttributes.language || undefined, 148 language: command[ 'language' ] || defaultAttributes.language || undefined,
149 privacy: command[ 'privacy' ] || defaultAttributes.privacy || VideoPrivacy.PUBLIC, 149 privacy: command[ 'privacy' ] || defaultAttributes.privacy || VideoPrivacy.PUBLIC,
150 support: command[ 'support' ] || defaultAttributes.support || undefined 150 support: command[ 'support' ] || defaultAttributes.support || undefined,
151 description: command[ 'videoDescription' ] || defaultAttributes.description || undefined,
152 tags: command[ 'tags' ] || defaultAttributes.tags || undefined
151 } 153 }
152 154
153 Object.assign(videoAttributes, booleanAttributes) 155 Object.assign(videoAttributes, booleanAttributes)