Fix default true values when uploding videos

pull/2096/head
Chocobozzz 2019-08-28 16:03:26 +02:00
parent b1b7f7160b
commit 3155c8606c
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 3 additions and 3 deletions

View File

@ -190,8 +190,8 @@ function buildVideo (channelId: number, body: VideoImportCreate, importData: You
category: body.category || importData.category,
licence: body.licence || importData.licence,
language: body.language || undefined,
commentsEnabled: body.commentsEnabled && true,
downloadEnabled: body.downloadEnabled && true,
commentsEnabled: body.commentsEnabled !== false, // If the value is not "false", the default is "true"
downloadEnabled: body.downloadEnabled !== false,
waitTranscoding: body.waitTranscoding || false,
state: VideoState.TO_IMPORT,
nsfw: body.nsfw || importData.nsfw || false,

View File

@ -186,7 +186,7 @@ async function addVideo (req: express.Request, res: express.Response) {
licence: videoInfo.licence,
language: videoInfo.language,
commentsEnabled: videoInfo.commentsEnabled || false,
downloadEnabled: videoInfo.downloadEnabled || true,
downloadEnabled: videoInfo.downloadEnabled !== false, // If the value is not "false", the default is "true"
waitTranscoding: videoInfo.waitTranscoding || false,
state: CONFIG.TRANSCODING.ENABLED ? VideoState.TO_TRANSCODE : VideoState.PUBLISHED,
nsfw: videoInfo.nsfw || false,