aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/config.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/config.ts')
-rw-r--r--server/controllers/api/config.ts12
1 files changed, 1 insertions, 11 deletions
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts
index 8bc3123bf..44f3d3ef7 100644
--- a/server/controllers/api/config.ts
+++ b/server/controllers/api/config.ts
@@ -10,6 +10,7 @@ import { auditLoggerFactory, CustomConfigAuditView, getAuditIdFromRes } from '..
10import { objectConverter } from '../../helpers/core-utils' 10import { objectConverter } from '../../helpers/core-utils'
11import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../helpers/signup' 11import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../helpers/signup'
12import { getServerCommit } from '../../helpers/utils' 12import { getServerCommit } from '../../helpers/utils'
13import { getEnabledResolutions } from '../../lib/video-transcoding'
13import { CONFIG, isEmailEnabled, reloadConfig } from '../../initializers/config' 14import { CONFIG, isEmailEnabled, reloadConfig } from '../../initializers/config'
14import { CONSTRAINTS_FIELDS, DEFAULT_THEME_NAME, PEERTUBE_VERSION } from '../../initializers/constants' 15import { CONSTRAINTS_FIELDS, DEFAULT_THEME_NAME, PEERTUBE_VERSION } from '../../initializers/constants'
15import { ClientHtml } from '../../lib/client-html' 16import { ClientHtml } from '../../lib/client-html'
@@ -285,16 +286,6 @@ function getRegisteredThemes () {
285 })) 286 }))
286} 287}
287 288
288function getEnabledResolutions (type: 'vod' | 'live') {
289 const transcoding = type === 'vod'
290 ? CONFIG.TRANSCODING
291 : CONFIG.LIVE.TRANSCODING
292
293 return Object.keys(transcoding.RESOLUTIONS)
294 .filter(key => transcoding.ENABLED && transcoding.RESOLUTIONS[key] === true)
295 .map(r => parseInt(r, 10))
296}
297
298function getRegisteredPlugins () { 289function getRegisteredPlugins () {
299 return PluginManager.Instance.getRegisteredPlugins() 290 return PluginManager.Instance.getRegisteredPlugins()
300 .map(p => ({ 291 .map(p => ({
@@ -345,7 +336,6 @@ function getExternalAuthsPlugins () {
345 336
346export { 337export {
347 configRouter, 338 configRouter,
348 getEnabledResolutions,
349 getRegisteredPlugins, 339 getRegisteredPlugins,
350 getRegisteredThemes 340 getRegisteredThemes
351} 341}