diff options
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/videos/import.ts | 1 | ||||
-rw-r--r-- | server/controllers/api/videos/index.ts | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.ts index 398fd5a7f..a5cddba89 100644 --- a/server/controllers/api/videos/import.ts +++ b/server/controllers/api/videos/import.ts | |||
@@ -171,6 +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 | waitTranscoding: body.waitTranscoding || false, | 175 | waitTranscoding: body.waitTranscoding || false, |
175 | state: VideoState.TO_IMPORT, | 176 | state: VideoState.TO_IMPORT, |
176 | 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 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) |