X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Finitializers%2Fconfig.ts;h=599f3f5acd79173e22e65d00e6cec3105ca1bf5b;hb=e1b49ee534108ba8ac98dcb209d2efcbf1ecd678;hp=723755c458a4d2bb214509a03de34e6043bdaefe;hpb=b5bfadf0b5365481179936fd3058134fd8be8e18;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/initializers/config.ts b/server/initializers/config.ts index 723755c45..599f3f5ac 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts @@ -48,8 +48,8 @@ const CONFIG = { BODY: { SIGNATURE: config.get('email.body.signature') }, - OBJECT: { - PREFIX: config.get('email.object.prefix') + ' ' + SUBJECT: { + PREFIX: config.get('email.subject.prefix') + ' ' } }, STORAGE: { @@ -63,7 +63,8 @@ const CONFIG = { PREVIEWS_DIR: buildPath(config.get('storage.previews')), CAPTIONS_DIR: buildPath(config.get('storage.captions')), TORRENTS_DIR: buildPath(config.get('storage.torrents')), - CACHE_DIR: buildPath(config.get('storage.cache')) + CACHE_DIR: buildPath(config.get('storage.cache')), + PLUGINS_DIR: buildPath(config.get('storage.plugins')) }, WEBSERVER: { SCHEME: config.get('webserver.https') === true ? 'https' : 'http', @@ -72,6 +73,14 @@ const CONFIG = { PORT: config.get('webserver.port') }, RATES_LIMIT: { + API: { + WINDOW_MS: parseDurationToMs(config.get('rates_limit.api.window')), + MAX: config.get('rates_limit.api.max') + }, + SIGNUP: { + WINDOW_MS: parseDurationToMs(config.get('rates_limit.signup.window')), + MAX: config.get('rates_limit.signup.max') + }, LOGIN: { WINDOW_MS: parseDurationToMs(config.get('rates_limit.login.window')), MAX: config.get('rates_limit.login.max') @@ -83,7 +92,8 @@ const CONFIG = { }, TRUST_PROXY: config.get('trust_proxy'), LOG: { - LEVEL: config.get('log.level') + LEVEL: config.get('log.level'), + ROTATION: config.get('log.rotation.enabled') }, SEARCH: { REMOTE_URI: { @@ -124,6 +134,13 @@ const CONFIG = { } } }, + PLUGINS: { + INDEX: { + ENABLED: config.get('plugins.index.enabled'), + CHECK_LATEST_VERSIONS_INTERVAL: parseDurationToMs(config.get('plugins.index.check_latest_versions_interval')), + URL: config.get('plugins.index.url') + } + }, ADMIN: { get EMAIL () { return config.get('admin.email') } }, @@ -148,13 +165,15 @@ const CONFIG = { TRANSCODING: { get ENABLED () { return config.get('transcoding.enabled') }, get ALLOW_ADDITIONAL_EXTENSIONS () { return config.get('transcoding.allow_additional_extensions') }, + get ALLOW_AUDIO_FILES () { return config.get('transcoding.allow_audio_files') }, get THREADS () { return config.get('transcoding.threads') }, RESOLUTIONS: { get '240p' () { return config.get('transcoding.resolutions.240p') }, get '360p' () { return config.get('transcoding.resolutions.360p') }, get '480p' () { return config.get('transcoding.resolutions.480p') }, get '720p' () { return config.get('transcoding.resolutions.720p') }, - get '1080p' () { return config.get('transcoding.resolutions.1080p') } + get '1080p' () { return config.get('transcoding.resolutions.1080p') }, + get '2160p' () { return config.get('transcoding.resolutions.2160p') } }, HLS: { get ENABLED () { return config.get('transcoding.hls.enabled') } @@ -212,6 +231,26 @@ const CONFIG = { get ENABLED () { return config.get('followers.instance.enabled') }, get MANUAL_APPROVAL () { return config.get('followers.instance.manual_approval') } } + }, + FOLLOWINGS: { + INSTANCE: { + AUTO_FOLLOW_BACK: { + get ENABLED () { + return config.get('followings.instance.auto_follow_back.enabled') + } + }, + AUTO_FOLLOW_INDEX: { + get ENABLED () { + return config.get('followings.instance.auto_follow_index.enabled') + }, + get INDEX_URL () { + return config.get('followings.instance.auto_follow_index.index_url') + } + } + } + }, + THEME: { + get DEFAULT () { return config.get('theme.default') } } }