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 6a73e13d0..ec25006e8 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -179,6 +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 || false,
182 waitTranscoding: videoInfo.waitTranscoding || false, 183 waitTranscoding: videoInfo.waitTranscoding || false,
183 state: CONFIG.TRANSCODING.ENABLED ? VideoState.TO_TRANSCODE : VideoState.PUBLISHED, 184 state: CONFIG.TRANSCODING.ENABLED ? VideoState.TO_TRANSCODE : VideoState.PUBLISHED,
184 nsfw: videoInfo.nsfw || false, 185 nsfw: videoInfo.nsfw || false,
@@ -322,6 +323,7 @@ async function updateVideo (req: express.Request, res: express.Response) {
322 if (videoInfoToUpdate.support !== undefined) videoInstance.set('support', videoInfoToUpdate.support) 323 if (videoInfoToUpdate.support !== undefined) videoInstance.set('support', videoInfoToUpdate.support)
323 if (videoInfoToUpdate.description !== undefined) videoInstance.set('description', videoInfoToUpdate.description) 324 if (videoInfoToUpdate.description !== undefined) videoInstance.set('description', videoInfoToUpdate.description)
324 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)
325 if (videoInfoToUpdate.privacy !== undefined) { 327 if (videoInfoToUpdate.privacy !== undefined) {
326 const newPrivacy = parseInt(videoInfoToUpdate.privacy.toString(), 10) 328 const newPrivacy = parseInt(videoInfoToUpdate.privacy.toString(), 10)
327 videoInstance.set('privacy', newPrivacy) 329 videoInstance.set('privacy', newPrivacy)