diff options
author | Lucas Declercq <lucas.declercq@ineat-conseil.fr> | 2018-10-08 14:42:55 +0200 |
---|---|---|
committer | Lucas Declercq <lucas.declercq@ineat-conseil.fr> | 2018-10-08 14:42:55 +0200 |
commit | 4ffdcfc63b8c804a0aea20609544c859ab57318b (patch) | |
tree | 079c10d28490fd1861c3643ae67c19570f483761 | |
parent | e0d827e29afc1b29eaf550deb0627c13088c0c65 (diff) | |
download | PeerTube-4ffdcfc63b8c804a0aea20609544c859ab57318b.tar.gz PeerTube-4ffdcfc63b8c804a0aea20609544c859ab57318b.tar.zst PeerTube-4ffdcfc63b8c804a0aea20609544c859ab57318b.zip |
Fix some defaults values + indentation
4 files changed, 5 insertions, 4 deletions
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.html index 46eb019b1..70d535055 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 @@ | |||
126 | ></my-peertube-checkbox> | 126 | ></my-peertube-checkbox> |
127 | 127 | ||
128 | <my-peertube-checkbox | 128 | <my-peertube-checkbox |
129 | inputName="downloadingEnabled" formControlName="downloadingEnabled" | 129 | inputName="downloadingEnabled" formControlName="downloadingEnabled" |
130 | i18n-labelText labelText="Disable downloading" | 130 | i18n-labelText labelText="Disable downloading" |
131 | ></my-peertube-checkbox> | 131 | ></my-peertube-checkbox> |
132 | 132 | ||
133 | <my-peertube-checkbox | 133 | <my-peertube-checkbox |
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'] = [] | |||
30 | if (!program['nsfw']) program['nsfw'] = false | 30 | if (!program['nsfw']) program['nsfw'] = false |
31 | if (!program['privacy']) program['privacy'] = VideoPrivacy.PUBLIC | 31 | if (!program['privacy']) program['privacy'] = VideoPrivacy.PUBLIC |
32 | if (!program['commentsEnabled']) program['commentsEnabled'] = false | 32 | if (!program['commentsEnabled']) program['commentsEnabled'] = false |
33 | if (!program['downloadingEnabled']) program['downloadingEnabled'] = false | 33 | if (!program['downloadingEnabled']) program['downloadingEnabled'] = true |
34 | 34 | ||
35 | getSettings() | 35 | getSettings() |
36 | .then(settings => { | 36 | .then(settings => { |