Fix some defaults values + indentation
This commit is contained in:
parent
e0d827e29a
commit
4ffdcfc63b
|
@ -126,8 +126,8 @@
|
||||||
></my-peertube-checkbox>
|
></my-peertube-checkbox>
|
||||||
|
|
||||||
<my-peertube-checkbox
|
<my-peertube-checkbox
|
||||||
inputName="downloadingEnabled" formControlName="downloadingEnabled"
|
inputName="downloadingEnabled" formControlName="downloadingEnabled"
|
||||||
i18n-labelText labelText="Disable downloading"
|
i18n-labelText labelText="Disable downloading"
|
||||||
></my-peertube-checkbox>
|
></my-peertube-checkbox>
|
||||||
|
|
||||||
<my-peertube-checkbox
|
<my-peertube-checkbox
|
||||||
|
|
|
@ -179,7 +179,7 @@ async function addVideo (req: express.Request, res: express.Response) {
|
||||||
licence: videoInfo.licence,
|
licence: videoInfo.licence,
|
||||||
language: videoInfo.language,
|
language: videoInfo.language,
|
||||||
commentsEnabled: videoInfo.commentsEnabled || false,
|
commentsEnabled: videoInfo.commentsEnabled || false,
|
||||||
downloadingEnabled: videoInfo.downloadingEnabled || false,
|
downloadingEnabled: videoInfo.downloadingEnabled || true,
|
||||||
waitTranscoding: videoInfo.waitTranscoding || false,
|
waitTranscoding: videoInfo.waitTranscoding || false,
|
||||||
state: CONFIG.TRANSCODING.ENABLED ? VideoState.TO_TRANSCODE : VideoState.PUBLISHED,
|
state: CONFIG.TRANSCODING.ENABLED ? VideoState.TO_TRANSCODE : VideoState.PUBLISHED,
|
||||||
nsfw: videoInfo.nsfw || false,
|
nsfw: videoInfo.nsfw || false,
|
||||||
|
|
|
@ -56,6 +56,7 @@ function sanitizeAndCheckVideoTorrentObject (video: any) {
|
||||||
// Default attributes
|
// Default attributes
|
||||||
if (!isVideoStateValid(video.state)) video.state = VideoState.PUBLISHED
|
if (!isVideoStateValid(video.state)) video.state = VideoState.PUBLISHED
|
||||||
if (!isBooleanValid(video.waitTranscoding)) video.waitTranscoding = false
|
if (!isBooleanValid(video.waitTranscoding)) video.waitTranscoding = false
|
||||||
|
if (!isBooleanValid(video.downloadingEnabled)) video.downloadingEnabled = true
|
||||||
|
|
||||||
return isActivityPubUrlValid(video.id) &&
|
return isActivityPubUrlValid(video.id) &&
|
||||||
isVideoNameValid(video.name) &&
|
isVideoNameValid(video.name) &&
|
||||||
|
|
|
@ -30,7 +30,7 @@ if (!program['tags']) program['tags'] = []
|
||||||
if (!program['nsfw']) program['nsfw'] = false
|
if (!program['nsfw']) program['nsfw'] = false
|
||||||
if (!program['privacy']) program['privacy'] = VideoPrivacy.PUBLIC
|
if (!program['privacy']) program['privacy'] = VideoPrivacy.PUBLIC
|
||||||
if (!program['commentsEnabled']) program['commentsEnabled'] = false
|
if (!program['commentsEnabled']) program['commentsEnabled'] = false
|
||||||
if (!program['downloadingEnabled']) program['downloadingEnabled'] = false
|
if (!program['downloadingEnabled']) program['downloadingEnabled'] = true
|
||||||
|
|
||||||
getSettings()
|
getSettings()
|
||||||
.then(settings => {
|
.then(settings => {
|
||||||
|
|
Loading…
Reference in New Issue