aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/videos/import.ts4
-rw-r--r--server/controllers/api/videos/index.ts2
2 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.ts
index ebe8718c7..28ced5836 100644
--- a/server/controllers/api/videos/import.ts
+++ b/server/controllers/api/videos/import.ts
@@ -190,8 +190,8 @@ function buildVideo (channelId: number, body: VideoImportCreate, importData: You
190 category: body.category || importData.category, 190 category: body.category || importData.category,
191 licence: body.licence || importData.licence, 191 licence: body.licence || importData.licence,
192 language: body.language || undefined, 192 language: body.language || undefined,
193 commentsEnabled: body.commentsEnabled && true, 193 commentsEnabled: body.commentsEnabled !== false, // If the value is not "false", the default is "true"
194 downloadEnabled: body.downloadEnabled && true, 194 downloadEnabled: body.downloadEnabled !== false,
195 waitTranscoding: body.waitTranscoding || false, 195 waitTranscoding: body.waitTranscoding || false,
196 state: VideoState.TO_IMPORT, 196 state: VideoState.TO_IMPORT,
197 nsfw: body.nsfw || importData.nsfw || false, 197 nsfw: body.nsfw || importData.nsfw || false,
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index b4f656575..19da504c7 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -186,7 +186,7 @@ async function addVideo (req: express.Request, res: express.Response) {
186 licence: videoInfo.licence, 186 licence: videoInfo.licence,
187 language: videoInfo.language, 187 language: videoInfo.language,
188 commentsEnabled: videoInfo.commentsEnabled || false, 188 commentsEnabled: videoInfo.commentsEnabled || false,
189 downloadEnabled: videoInfo.downloadEnabled || true, 189 downloadEnabled: videoInfo.downloadEnabled !== false, // If the value is not "false", the default is "true"
190 waitTranscoding: videoInfo.waitTranscoding || false, 190 waitTranscoding: videoInfo.waitTranscoding || false,
191 state: CONFIG.TRANSCODING.ENABLED ? VideoState.TO_TRANSCODE : VideoState.PUBLISHED, 191 state: CONFIG.TRANSCODING.ENABLED ? VideoState.TO_TRANSCODE : VideoState.PUBLISHED,
192 nsfw: videoInfo.nsfw || false, 192 nsfw: videoInfo.nsfw || false,