ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix some defaults values + indentation
Lucas Declercq4ffdcfc63b8c
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.html b/client/src/app/videos/+video-edit/shared/video-edit.component.htmlindex 46eb019b12..70d5350551 100644--- a/client/src/app/videos/+video-edit/shared/video-edit.component.html+++ b/client/src/app/videos/+video-edit/shared/video-edit.component.html@@ -126,8 +126,8 @@></my-peertube-checkbox><my-peertube-checkbox- inputName="downloadingEnabled" formControlName="downloadingEnabled"- i18n-labelText labelText="Disable downloading"+ inputName="downloadingEnabled" formControlName="downloadingEnabled"+ i18n-labelText labelText="Disable downloading"></my-peertube-checkbox><my-peertube-checkboxdiff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.tsindex ec25006e86..4b6d1b8470 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) {licence: videoInfo.licence,language: videoInfo.language,commentsEnabled: videoInfo.commentsEnabled || false,- downloadingEnabled: videoInfo.downloadingEnabled || false,+ downloadingEnabled: videoInfo.downloadingEnabled || true,waitTranscoding: videoInfo.waitTranscoding || false,state: CONFIG.TRANSCODING.ENABLED ? VideoState.TO_TRANSCODE : VideoState.PUBLISHED,nsfw: videoInfo.nsfw || false,diff --git a/server/helpers/custom-validators/activitypub/videos.ts b/server/helpers/custom-validators/activitypub/videos.tsindex 34e4cdff9e..59964f91a0 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) {// Default attributesif (!isVideoStateValid(video.state)) video.state = VideoState.PUBLISHEDif (!isBooleanValid(video.waitTranscoding)) video.waitTranscoding = false+ if (!isBooleanValid(video.downloadingEnabled)) video.downloadingEnabled = truereturn isActivityPubUrlValid(video.id) &&isVideoNameValid(video.name) &&diff --git a/server/tools/peertube-upload.ts b/server/tools/peertube-upload.tsindex e7b885a388..e2ba4bdbc6 100644--- a/server/tools/peertube-upload.ts+++ b/server/tools/peertube-upload.ts@@ -30,7 +30,7 @@ if (!program['tags']) program['tags'] = []if (!program['nsfw']) program['nsfw'] = falseif (!program['privacy']) program['privacy'] = VideoPrivacy.PUBLICif (!program['commentsEnabled']) program['commentsEnabled'] = false-if (!program['downloadingEnabled']) program['downloadingEnabled'] = false+if (!program['downloadingEnabled']) program['downloadingEnabled'] = truegetSettings().then(settings => {