aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r--server/controllers/api/videos/index.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index 3b1c2d255..76a318d13 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -182,6 +182,7 @@ async function addVideo (req: express.Request, res: express.Response) {
182 licence: videoInfo.licence, 182 licence: videoInfo.licence,
183 language: videoInfo.language, 183 language: videoInfo.language,
184 commentsEnabled: videoInfo.commentsEnabled || false, 184 commentsEnabled: videoInfo.commentsEnabled || false,
185 downloadEnabled: videoInfo.downloadEnabled || true,
185 waitTranscoding: videoInfo.waitTranscoding || false, 186 waitTranscoding: videoInfo.waitTranscoding || false,
186 state: CONFIG.TRANSCODING.ENABLED ? VideoState.TO_TRANSCODE : VideoState.PUBLISHED, 187 state: CONFIG.TRANSCODING.ENABLED ? VideoState.TO_TRANSCODE : VideoState.PUBLISHED,
187 nsfw: videoInfo.nsfw || false, 188 nsfw: videoInfo.nsfw || false,
@@ -326,6 +327,7 @@ async function updateVideo (req: express.Request, res: express.Response) {
326 if (videoInfoToUpdate.support !== undefined) videoInstance.set('support', videoInfoToUpdate.support) 327 if (videoInfoToUpdate.support !== undefined) videoInstance.set('support', videoInfoToUpdate.support)
327 if (videoInfoToUpdate.description !== undefined) videoInstance.set('description', videoInfoToUpdate.description) 328 if (videoInfoToUpdate.description !== undefined) videoInstance.set('description', videoInfoToUpdate.description)
328 if (videoInfoToUpdate.commentsEnabled !== undefined) videoInstance.set('commentsEnabled', videoInfoToUpdate.commentsEnabled) 329 if (videoInfoToUpdate.commentsEnabled !== undefined) videoInstance.set('commentsEnabled', videoInfoToUpdate.commentsEnabled)
330 if (videoInfoToUpdate.downloadEnabled !== undefined) videoInstance.set('downloadEnabled', videoInfoToUpdate.downloadEnabled)
329 if (videoInfoToUpdate.privacy !== undefined) { 331 if (videoInfoToUpdate.privacy !== undefined) {
330 const newPrivacy = parseInt(videoInfoToUpdate.privacy.toString(), 10) 332 const newPrivacy = parseInt(videoInfoToUpdate.privacy.toString(), 10)
331 videoInstance.set('privacy', newPrivacy) 333 videoInstance.set('privacy', newPrivacy)