X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fserver-config-manager.ts;h=78a9546ae6e85afdb5e89e9f5db3ff276d118c3c;hb=2a491182e483b97afb1b65c908b23cb48d591807;hp=6aa459f82dd9b5b2f075a7473fd62a356e4fd8c3;hpb=0882c8e6509b2a4ea48f6c48ecb2aa4aa371500a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/server-config-manager.ts b/server/lib/server-config-manager.ts index 6aa459f82..78a9546ae 100644 --- a/server/lib/server-config-manager.ts +++ b/server/lib/server-config-manager.ts @@ -1,13 +1,14 @@ -import { getServerCommit } from '@server/helpers/utils' +import { getServerCommit } from '@server/helpers/version' import { CONFIG, isEmailEnabled } from '@server/initializers/config' import { CONSTRAINTS_FIELDS, DEFAULT_THEME_NAME, PEERTUBE_VERSION } from '@server/initializers/constants' import { isSignupAllowed, isSignupAllowedForCurrentIP } from '@server/lib/signup' import { ActorCustomPageModel } from '@server/models/account/actor-custom-page' +import { PluginModel } from '@server/models/server/plugin' import { HTMLServerConfig, RegisteredExternalAuthConfig, RegisteredIdAndPassAuthConfig, ServerConfig } from '@shared/models' import { Hooks } from './plugins/hooks' import { PluginManager } from './plugins/plugin-manager' import { getThemeOrDefault } from './plugins/theme-utils' -import { VideoTranscodingProfilesManager } from './transcoding/video-transcoding-profiles' +import { VideoTranscodingProfilesManager } from './transcoding/default-transcoding-profiles' /** * @@ -45,7 +46,11 @@ class ServerConfigManager { client: { videos: { miniature: { + displayAuthorAvatar: CONFIG.CLIENT.VIDEOS.MINIATURE.DISPLAY_AUTHOR_AVATAR, preferAuthorDisplayName: CONFIG.CLIENT.VIDEOS.MINIATURE.PREFER_AUTHOR_DISPLAY_NAME + }, + resumableUpload: { + maxChunkSize: CONFIG.CLIENT.VIDEOS.RESUMABLE_UPLOAD.MAX_CHUNK_SIZE } }, menu: { @@ -55,6 +60,23 @@ class ServerConfigManager { } }, + defaults: { + publish: { + downloadEnabled: CONFIG.DEFAULTS.PUBLISH.DOWNLOAD_ENABLED, + commentsEnabled: CONFIG.DEFAULTS.PUBLISH.COMMENTS_ENABLED, + privacy: CONFIG.DEFAULTS.PUBLISH.PRIVACY, + licence: CONFIG.DEFAULTS.PUBLISH.LICENCE + }, + p2p: { + webapp: { + enabled: CONFIG.DEFAULTS.P2P.WEBAPP.ENABLED + }, + embed: { + enabled: CONFIG.DEFAULTS.P2P.EMBED.ENABLED + } + } + }, + webadmin: { configuration: { edition: { @@ -118,6 +140,10 @@ class ServerConfigManager { 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, @@ -133,6 +159,9 @@ class ServerConfigManager { port: CONFIG.LIVE.RTMP.PORT } }, + videoStudio: { + enabled: CONFIG.VIDEO_STUDIO.ENABLED + }, import: { videos: { http: { @@ -141,6 +170,9 @@ class ServerConfigManager { torrent: { enabled: CONFIG.IMPORT.VIDEOS.TORRENT.ENABLED } + }, + videoChannelSynchronization: { + enabled: CONFIG.IMPORT.VIDEO_CHANNEL_SYNCHRONIZATION.ENABLED } }, autoBlacklist: { @@ -252,6 +284,7 @@ class ServerConfigManager { getRegisteredThemes () { return PluginManager.Instance.getRegisteredThemes() .map(t => ({ + npmName: PluginModel.buildNpmName(t.name, t.type), name: t.name, version: t.version, description: t.description, @@ -263,6 +296,7 @@ class ServerConfigManager { getRegisteredPlugins () { return PluginManager.Instance.getRegisteredPlugins() .map(p => ({ + npmName: PluginModel.buildNpmName(p.name, p.type), name: p.name, version: p.version, description: p.description,