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.ts1
-rw-r--r--server/controllers/api/videos/index.ts2
2 files changed, 3 insertions, 0 deletions
diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.ts
index 98366cd82..7053d5253 100644
--- a/server/controllers/api/videos/import.ts
+++ b/server/controllers/api/videos/import.ts
@@ -164,6 +164,7 @@ function buildVideo (channelId: number, body: VideoImportCreate, importData: You
164 licence: body.licence || importData.licence, 164 licence: body.licence || importData.licence,
165 language: body.language || undefined, 165 language: body.language || undefined,
166 commentsEnabled: body.commentsEnabled || true, 166 commentsEnabled: body.commentsEnabled || true,
167 downloadEnabled: body.downloadEnabled || true,
167 waitTranscoding: body.waitTranscoding || false, 168 waitTranscoding: body.waitTranscoding || false,
168 state: VideoState.TO_IMPORT, 169 state: VideoState.TO_IMPORT,
169 nsfw: body.nsfw || importData.nsfw || false, 170 nsfw: body.nsfw || importData.nsfw || false,
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)