diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-14 17:17:01 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-14 17:17:01 +0100 |
commit | 3cf68b869decf07ff7435fe1436d4f3134df1bf4 (patch) | |
tree | 836efe5ddc626fef3ba4c96269efbca305f46256 /server/controllers/api/videos | |
parent | a6f919e455f2c6ae8f2194da4aa66824a6bfd09e (diff) | |
download | PeerTube-3cf68b869decf07ff7435fe1436d4f3134df1bf4.tar.gz PeerTube-3cf68b869decf07ff7435fe1436d4f3134df1bf4.tar.zst PeerTube-3cf68b869decf07ff7435fe1436d4f3134df1bf4.zip |
Ability for admins to set default upload values
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r-- | server/controllers/api/videos/import.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.ts index 52864bdfd..3c445efce 100644 --- a/server/controllers/api/videos/import.ts +++ b/server/controllers/api/videos/import.ts | |||
@@ -216,10 +216,10 @@ async function buildVideo (channelId: number, body: VideoImportCreate, importDat | |||
216 | name: body.name || importData.name || 'Unknown name', | 216 | name: body.name || importData.name || 'Unknown name', |
217 | remote: false, | 217 | remote: false, |
218 | category: body.category || importData.category, | 218 | category: body.category || importData.category, |
219 | licence: body.licence || importData.licence, | 219 | licence: body.licence ?? importData.licence ?? CONFIG.DEFAULTS.PUBLISH.LICENCE, |
220 | language: body.language || importData.language, | 220 | language: body.language || importData.language, |
221 | commentsEnabled: body.commentsEnabled !== false, // If the value is not "false", the default is "true" | 221 | commentsEnabled: body.commentsEnabled ?? CONFIG.DEFAULTS.PUBLISH.COMMENTS_ENABLED, |
222 | downloadEnabled: body.downloadEnabled !== false, | 222 | downloadEnabled: body.downloadEnabled ?? CONFIG.DEFAULTS.PUBLISH.DOWNLOAD_ENABLED, |
223 | waitTranscoding: body.waitTranscoding || false, | 223 | waitTranscoding: body.waitTranscoding || false, |
224 | state: VideoState.TO_IMPORT, | 224 | state: VideoState.TO_IMPORT, |
225 | nsfw: body.nsfw || importData.nsfw || false, | 225 | nsfw: body.nsfw || importData.nsfw || false, |