X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Fapi%2Fconfig.ts;h=86434f382fbf24799fa2a331425449ca131727ab;hb=4565774669bc3c1b11cc726d577946953dbe53c5;hp=b253db397056e510b1ae889af589f0ecaee44965;hpb=0882c8e6509b2a4ea48f6c48ecb2aa4aa371500a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts index b253db397..86434f382 100644 --- a/server/controllers/api/config.ts +++ b/server/controllers/api/config.ts @@ -3,9 +3,7 @@ import { remove, writeJSON } from 'fs-extra' import { snakeCase } from 'lodash' import validator from 'validator' import { ServerConfigManager } from '@server/lib/server-config-manager' -import { UserRight } from '../../../shared' -import { About } from '../../../shared/models/server/about.model' -import { CustomConfig } from '../../../shared/models/server/custom-config.model' +import { About, CustomConfig, UserRight } from '@shared/models' import { auditLoggerFactory, CustomConfigAuditView, getAuditIdFromRes } from '../../helpers/audit-logger' import { objectConverter } from '../../helpers/core-utils' import { CONFIG, reloadConfig } from '../../initializers/config' @@ -195,6 +193,7 @@ function customConfig (): CustomConfig { signup: { enabled: CONFIG.SIGNUP.ENABLED, limit: CONFIG.SIGNUP.LIMIT, + requiresApproval: CONFIG.SIGNUP.REQUIRES_APPROVAL, requiresEmailVerification: CONFIG.SIGNUP.REQUIRES_EMAIL_VERIFICATION, minimumAge: CONFIG.SIGNUP.MINIMUM_AGE }, @@ -229,6 +228,7 @@ function customConfig (): CustomConfig { '1440p': CONFIG.TRANSCODING.RESOLUTIONS['1440p'], '2160p': CONFIG.TRANSCODING.RESOLUTIONS['2160p'] }, + alwaysTranscodeOriginalResolution: CONFIG.TRANSCODING.ALWAYS_TRANSCODE_ORIGINAL_RESOLUTION, webtorrent: { enabled: CONFIG.TRANSCODING.WEBTORRENT.ENABLED }, @@ -239,6 +239,9 @@ function customConfig (): CustomConfig { live: { enabled: CONFIG.LIVE.ENABLED, allowReplay: CONFIG.LIVE.ALLOW_REPLAY, + latencySetting: { + enabled: CONFIG.LIVE.LATENCY_SETTING.ENABLED + }, maxDuration: CONFIG.LIVE.MAX_DURATION, maxInstanceLives: CONFIG.LIVE.MAX_INSTANCE_LIVES, maxUserLives: CONFIG.LIVE.MAX_USER_LIVES, @@ -255,9 +258,13 @@ function customConfig (): CustomConfig { '1080p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['1080p'], '1440p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['1440p'], '2160p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['2160p'] - } + }, + alwaysTranscodeOriginalResolution: CONFIG.LIVE.TRANSCODING.ALWAYS_TRANSCODE_ORIGINAL_RESOLUTION } }, + videoStudio: { + enabled: CONFIG.VIDEO_STUDIO.ENABLED + }, import: { videos: { concurrency: CONFIG.IMPORT.VIDEOS.CONCURRENCY, @@ -267,6 +274,10 @@ function customConfig (): CustomConfig { torrent: { enabled: CONFIG.IMPORT.VIDEOS.TORRENT.ENABLED } + }, + videoChannelSynchronization: { + enabled: CONFIG.IMPORT.VIDEO_CHANNEL_SYNCHRONIZATION.ENABLED, + maxPerUser: CONFIG.IMPORT.VIDEO_CHANNEL_SYNCHRONIZATION.MAX_PER_USER } }, trending: {