X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Finitializers%2Fconfig.ts;h=59a65d6a56cd6ef33583e2cd7684670b5090cb0c;hb=6348fb18840c912e107cfbc0f51d1c440b9c1cba;hp=f2e9f7088b8c16a0e12668583d095c48fdf8f97d;hpb=b65de1be4dcf626c552be613d531d3f6e23c6085;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/initializers/config.ts b/server/initializers/config.ts index f2e9f7088..59a65d6a5 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts @@ -4,9 +4,9 @@ import { dirname, join } from 'path' import { decacheModule } from '@server/helpers/decache' import { VideoRedundancyConfigFilter } from '@shared/models/redundancy/video-redundancy-config-filter.type' import { BroadcastMessageLevel } from '@shared/models/server' +import { buildPath, root } from '../../shared/core-utils' import { VideoPrivacy, VideosRedundancyStrategy } from '../../shared/models' import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type' -import { buildPath, root } from '../../shared/core-utils' import { parseBytes, parseDurationToMs } from '../helpers/core-utils' // Use a variable to reload the configuration if we need @@ -62,7 +62,11 @@ const CONFIG = { CLIENT: { VIDEOS: { MINIATURE: { - get PREFER_AUTHOR_DISPLAY_NAME () { return config.get('client.videos.miniature.prefer_author_display_name') } + get PREFER_AUTHOR_DISPLAY_NAME () { return config.get('client.videos.miniature.prefer_author_display_name') }, + get DISPLAY_AUTHOR_AVATAR () { return config.get('client.videos.miniature.display_author_avatar') } + }, + RESUMABLE_UPLOAD: { + get MAX_CHUNK_SIZE () { return parseBytes(config.get('client.videos.resumable_upload.max_chunk_size') || 0) } } }, MENU: { @@ -110,6 +114,7 @@ const CONFIG = { MAX_UPLOAD_PART: bytes.parse(config.get('object_storage.max_upload_part')), ENDPOINT: config.get('object_storage.endpoint'), REGION: config.get('object_storage.region'), + UPLOAD_ACL: config.get('object_storage.upload_acl'), CREDENTIALS: { ACCESS_KEY_ID: config.get('object_storage.credentials.access_key_id'), SECRET_ACCESS_KEY: config.get('object_storage.credentials.secret_access_key') @@ -210,6 +215,12 @@ const CONFIG = { IP_VIEW_EXPIRATION: parseDurationToMs(config.get('views.videos.ip_view_expiration')) } }, + GEO_IP: { + ENABLED: config.get('geo_ip.enabled'), + COUNTRY: { + DATABASE_URL: config.get('geo_ip.country.database_url') + } + }, PLUGINS: { INDEX: { ENABLED: config.get('plugins.index.enabled'), @@ -295,14 +306,22 @@ const CONFIG = { get ALLOW_REPLAY () { return config.get('live.allow_replay') }, + LATENCY_SETTING: { + get ENABLED () { return config.get('live.latency_setting.enabled') } + }, + RTMP: { get ENABLED () { return config.get('live.rtmp.enabled') }, - get PORT () { return config.get('live.rtmp.port') } + get PORT () { return config.get('live.rtmp.port') }, + get HOSTNAME () { return config.get('live.rtmp.hostname') }, + get PUBLIC_HOSTNAME () { return config.get('live.rtmp.public_hostname') } }, RTMPS: { get ENABLED () { return config.get('live.rtmps.enabled') }, get PORT () { return config.get('live.rtmps.port') }, + get HOSTNAME () { return config.get('live.rtmps.hostname') }, + get PUBLIC_HOSTNAME () { return config.get('live.rtmps.public_hostname') }, get KEY_FILE () { return config.get('live.rtmps.key_file') }, get CERT_FILE () { return config.get('live.rtmps.cert_file') } }, @@ -324,6 +343,9 @@ const CONFIG = { } } }, + VIDEO_STUDIO: { + get ENABLED () { return config.get('video_studio.enabled') } + }, IMPORT: { VIDEOS: { get CONCURRENCY () { return config.get('import.videos.concurrency') }, @@ -333,7 +355,8 @@ const CONFIG = { 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 NAME () { return config.get('import.videos.http.youtube_dl_release.name') }, + get PYTHON_PATH () { return config.get('import.videos.http.youtube_dl_release.python_path') } }, get FORCE_IPV4 () { return config.get('import.videos.http.force_ipv4') }