Rename downloadingEnabled property to downloadEnabled

This commit is contained in:
Lucas Declercq
2018-10-08 14:45:22 +02:00
parent 4ffdcfc63b
commit 7f2cfe3a79
35 changed files with 64 additions and 64 deletions

View File

@@ -171,7 +171,7 @@ function buildVideo (channelId: number, body: VideoImportCreate, importData: You
licence: body.licence || importData.licence,
language: body.language || undefined,
commentsEnabled: body.commentsEnabled || true,
downloadingEnabled: body.downloadingEnabled || true,
downloadEnabled: body.downloadEnabled || true,
waitTranscoding: body.waitTranscoding || false,
state: VideoState.TO_IMPORT,
nsfw: body.nsfw || importData.nsfw || false,

View File

@@ -179,7 +179,7 @@ async function addVideo (req: express.Request, res: express.Response) {
licence: videoInfo.licence,
language: videoInfo.language,
commentsEnabled: videoInfo.commentsEnabled || false,
downloadingEnabled: videoInfo.downloadingEnabled || true,
downloadEnabled: videoInfo.downloadEnabled || true,
waitTranscoding: videoInfo.waitTranscoding || false,
state: CONFIG.TRANSCODING.ENABLED ? VideoState.TO_TRANSCODE : VideoState.PUBLISHED,
nsfw: videoInfo.nsfw || false,
@@ -323,7 +323,7 @@ async function updateVideo (req: express.Request, res: express.Response) {
if (videoInfoToUpdate.support !== undefined) videoInstance.set('support', videoInfoToUpdate.support)
if (videoInfoToUpdate.description !== undefined) videoInstance.set('description', videoInfoToUpdate.description)
if (videoInfoToUpdate.commentsEnabled !== undefined) videoInstance.set('commentsEnabled', videoInfoToUpdate.commentsEnabled)
if (videoInfoToUpdate.downloadingEnabled !== undefined) videoInstance.set('downloadingEnabled', videoInfoToUpdate.downloadingEnabled)
if (videoInfoToUpdate.downloadEnabled !== undefined) videoInstance.set('downloadEnabled', videoInfoToUpdate.downloadEnabled)
if (videoInfoToUpdate.privacy !== undefined) {
const newPrivacy = parseInt(videoInfoToUpdate.privacy.toString(), 10)
videoInstance.set('privacy', newPrivacy)