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.ts2
-rw-r--r--server/controllers/api/videos/index.ts4
2 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.ts
index a5cddba89..9e51e2000 100644
--- a/server/controllers/api/videos/import.ts
+++ b/server/controllers/api/videos/import.ts
@@ -171,7 +171,7 @@ function buildVideo (channelId: number, body: VideoImportCreate, importData: You
171 licence: body.licence || importData.licence, 171 licence: body.licence || importData.licence,
172 language: body.language || undefined, 172 language: body.language || undefined,
173 commentsEnabled: body.commentsEnabled || true, 173 commentsEnabled: body.commentsEnabled || true,
174 downloadingEnabled: body.downloadingEnabled || true, 174 downloadEnabled: body.downloadEnabled || true,
175 waitTranscoding: body.waitTranscoding || false, 175 waitTranscoding: body.waitTranscoding || false,
176 state: VideoState.TO_IMPORT, 176 state: VideoState.TO_IMPORT,
177 nsfw: body.nsfw || importData.nsfw || false, 177 nsfw: body.nsfw || importData.nsfw || false,
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index 4b6d1b847..7d55f06b6 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -179,7 +179,7 @@ async function addVideo (req: express.Request, res: express.Response) {
179 licence: videoInfo.licence, 179 licence: videoInfo.licence,
180 language: videoInfo.language, 180 language: videoInfo.language,
181 commentsEnabled: videoInfo.commentsEnabled || false, 181 commentsEnabled: videoInfo.commentsEnabled || false,
182 downloadingEnabled: videoInfo.downloadingEnabled || true, 182 downloadEnabled: videoInfo.downloadEnabled || true,
183 waitTranscoding: videoInfo.waitTranscoding || false, 183 waitTranscoding: videoInfo.waitTranscoding || false,
184 state: CONFIG.TRANSCODING.ENABLED ? VideoState.TO_TRANSCODE : VideoState.PUBLISHED, 184 state: CONFIG.TRANSCODING.ENABLED ? VideoState.TO_TRANSCODE : VideoState.PUBLISHED,
185 nsfw: videoInfo.nsfw || false, 185 nsfw: videoInfo.nsfw || false,
@@ -323,7 +323,7 @@ async function updateVideo (req: express.Request, res: express.Response) {
323 if (videoInfoToUpdate.support !== undefined) videoInstance.set('support', videoInfoToUpdate.support) 323 if (videoInfoToUpdate.support !== undefined) videoInstance.set('support', videoInfoToUpdate.support)
324 if (videoInfoToUpdate.description !== undefined) videoInstance.set('description', videoInfoToUpdate.description) 324 if (videoInfoToUpdate.description !== undefined) videoInstance.set('description', videoInfoToUpdate.description)
325 if (videoInfoToUpdate.commentsEnabled !== undefined) videoInstance.set('commentsEnabled', videoInfoToUpdate.commentsEnabled) 325 if (videoInfoToUpdate.commentsEnabled !== undefined) videoInstance.set('commentsEnabled', videoInfoToUpdate.commentsEnabled)
326 if (videoInfoToUpdate.downloadingEnabled !== undefined) videoInstance.set('downloadingEnabled', videoInfoToUpdate.downloadingEnabled) 326 if (videoInfoToUpdate.downloadEnabled !== undefined) videoInstance.set('downloadEnabled', videoInfoToUpdate.downloadEnabled)
327 if (videoInfoToUpdate.privacy !== undefined) { 327 if (videoInfoToUpdate.privacy !== undefined) {
328 const newPrivacy = parseInt(videoInfoToUpdate.privacy.toString(), 10) 328 const newPrivacy = parseInt(videoInfoToUpdate.privacy.toString(), 10)
329 videoInstance.set('privacy', newPrivacy) 329 videoInstance.set('privacy', newPrivacy)