aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/controllers/api/videos/index.ts2
-rw-r--r--server/helpers/custom-validators/activitypub/videos.ts1
-rw-r--r--server/tools/peertube-upload.ts2
3 files changed, 3 insertions, 2 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index ec25006e8..4b6d1b847 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -179,7 +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 downloadingEnabled: videoInfo.downloadingEnabled || true,
183 waitTranscoding: videoInfo.waitTranscoding || false, 183 waitTranscoding: videoInfo.waitTranscoding || false,
184 state: CONFIG.TRANSCODING.ENABLED ? VideoState.TO_TRANSCODE : VideoState.PUBLISHED, 184 state: CONFIG.TRANSCODING.ENABLED ? VideoState.TO_TRANSCODE : VideoState.PUBLISHED,
185 nsfw: videoInfo.nsfw || false, 185 nsfw: videoInfo.nsfw || false,
diff --git a/server/helpers/custom-validators/activitypub/videos.ts b/server/helpers/custom-validators/activitypub/videos.ts
index 34e4cdff9..59964f91a 100644
--- a/server/helpers/custom-validators/activitypub/videos.ts
+++ b/server/helpers/custom-validators/activitypub/videos.ts
@@ -56,6 +56,7 @@ function sanitizeAndCheckVideoTorrentObject (video: any) {
56 // Default attributes 56 // Default attributes
57 if (!isVideoStateValid(video.state)) video.state = VideoState.PUBLISHED 57 if (!isVideoStateValid(video.state)) video.state = VideoState.PUBLISHED
58 if (!isBooleanValid(video.waitTranscoding)) video.waitTranscoding = false 58 if (!isBooleanValid(video.waitTranscoding)) video.waitTranscoding = false
59 if (!isBooleanValid(video.downloadingEnabled)) video.downloadingEnabled = true
59 60
60 return isActivityPubUrlValid(video.id) && 61 return isActivityPubUrlValid(video.id) &&
61 isVideoNameValid(video.name) && 62 isVideoNameValid(video.name) &&
diff --git a/server/tools/peertube-upload.ts b/server/tools/peertube-upload.ts
index e7b885a38..e2ba4bdbc 100644
--- a/server/tools/peertube-upload.ts
+++ b/server/tools/peertube-upload.ts
@@ -30,7 +30,7 @@ if (!program['tags']) program['tags'] = []
30if (!program['nsfw']) program['nsfw'] = false 30if (!program['nsfw']) program['nsfw'] = false
31if (!program['privacy']) program['privacy'] = VideoPrivacy.PUBLIC 31if (!program['privacy']) program['privacy'] = VideoPrivacy.PUBLIC
32if (!program['commentsEnabled']) program['commentsEnabled'] = false 32if (!program['commentsEnabled']) program['commentsEnabled'] = false
33if (!program['downloadingEnabled']) program['downloadingEnabled'] = false 33if (!program['downloadingEnabled']) program['downloadingEnabled'] = true
34 34
35getSettings() 35getSettings()
36 .then(settings => { 36 .then(settings => {