diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-29 14:10:31 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-07-29 14:10:31 +0200 |
commit | 6f530096cbceda09377c2e8e235cf02c36226989 (patch) | |
tree | 9e15915d8e59ec50f8ae8d5ac4ac315ea54e5c07 /server/tools/cli.ts | |
parent | 2284f202070aa2e49156cc52b3b1596a7d5aadec (diff) | |
download | PeerTube-6f530096cbceda09377c2e8e235cf02c36226989.tar.gz PeerTube-6f530096cbceda09377c2e8e235cf02c36226989.tar.zst PeerTube-6f530096cbceda09377c2e8e235cf02c36226989.zip |
Correctly import tags in CLI
Diffstat (limited to 'server/tools/cli.ts')
-rw-r--r-- | server/tools/cli.ts | 6 |
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 | ||
124 | async function buildVideoAttributesFromCommander (url: string, command: Command, defaultAttributes: any) { | 124 | async 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) |