Ability for admins to set default upload values

This commit is contained in:
Chocobozzz
2021-12-14 17:17:01 +01:00
parent a6f919e455
commit 3cf68b869d
31 changed files with 467 additions and 89 deletions

View File

@@ -216,10 +216,10 @@ async function buildVideo (channelId: number, body: VideoImportCreate, importDat
name: body.name || importData.name || 'Unknown name',
remote: false,
category: body.category || importData.category,
licence: body.licence || importData.licence,
licence: body.licence ?? importData.licence ?? CONFIG.DEFAULTS.PUBLISH.LICENCE,
language: body.language || importData.language,
commentsEnabled: body.commentsEnabled !== false, // If the value is not "false", the default is "true"
downloadEnabled: body.downloadEnabled !== false,
commentsEnabled: body.commentsEnabled ?? CONFIG.DEFAULTS.PUBLISH.COMMENTS_ENABLED,
downloadEnabled: body.downloadEnabled ?? CONFIG.DEFAULTS.PUBLISH.DOWNLOAD_ENABLED,
waitTranscoding: body.waitTranscoding || false,
state: VideoState.TO_IMPORT,
nsfw: body.nsfw || importData.nsfw || false,