X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Finitializers%2Fconfig.ts;h=8375bf4304cda5e3794bf79871596de32f316f50;hb=754b6f5f41bdc40aaaeefdb3c351666c305abe20;hp=48bb5ab8ee596124c86f1c0b8f1b1da5fc23b947;hpb=cf0c8ee588e37809d85ec1deec1e4fdfa0f122a5;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/initializers/config.ts b/server/initializers/config.ts index 48bb5ab8e..8375bf430 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts @@ -6,7 +6,6 @@ import { VideoRedundancyConfigFilter } from '@shared/models/redundancy/video-red import { BroadcastMessageLevel } from '@shared/models/server' import { VideosRedundancyStrategy } from '../../shared/models' import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type' -// Do not use barrels, remain constants as independent as possible import { buildPath, parseBytes, parseDurationToMs, root } from '../helpers/core-utils' // Use a variable to reload the configuration if we need @@ -69,6 +68,7 @@ const CONFIG = { STORAGE: { TMP_DIR: buildPath(config.get('storage.tmp')), + BIN_DIR: buildPath(config.get('storage.bin')), ACTOR_IMAGES: buildPath(config.get('storage.avatars')), LOG_DIR: buildPath(config.get('storage.logs')), VIDEOS_DIR: buildPath(config.get('storage.videos')), @@ -131,10 +131,10 @@ const CONFIG = { LEVEL: config.get('log.level'), ROTATION: { ENABLED: config.get('log.rotation.enabled'), - MAX_FILE_SIZE: bytes.parse(config.get('log.rotation.maxFileSize')), - MAX_FILES: config.get('log.rotation.maxFiles') + MAX_FILE_SIZE: bytes.parse(config.get('log.rotation.max_file_size')), + MAX_FILES: config.get('log.rotation.max_files') }, - ANONYMIZE_IP: config.get('log.anonymizeIP'), + ANONYMIZE_IP: config.get('log.anonymize_ip'), LOG_PING_REQUESTS: config.get('log.log_ping_requests'), PRETTIFY_SQL: config.get('log.prettify_sql') }, @@ -233,6 +233,9 @@ const CONFIG = { get VIDEO_QUOTA () { return parseBytes(config.get('user.video_quota')) }, get VIDEO_QUOTA_DAILY () { return parseBytes(config.get('user.video_quota_daily')) } }, + VIDEO_CHANNELS: { + get MAX_PER_USER () { return config.get('video_channels.max_per_user') } + }, TRANSCODING: { get ENABLED () { return config.get('transcoding.enabled') }, get ALLOW_ADDITIONAL_EXTENSIONS () { return config.get('transcoding.allow_additional_extensions') }, @@ -292,11 +295,13 @@ const CONFIG = { HTTP: { get ENABLED () { return config.get('import.videos.http.enabled') }, - get FORCE_IPV4 () { return config.get('import.videos.http.force_ipv4') }, - PROXY: { - get ENABLED () { return config.get('import.videos.http.proxy.enabled') }, - get URL () { return config.get('import.videos.http.proxy.url') } - } + + YOUTUBE_DL_RELEASE: { + get URL () { return config.get('import.videos.http.youtube_dl_release.url') }, + get NAME () { return config.get('import.videos.http.youtube_dl_release.name') } + }, + + get FORCE_IPV4 () { return config.get('import.videos.http.force_ipv4') } }, TORRENT: { get ENABLED () { return config.get('import.videos.torrent.enabled') }