aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/static.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/static.ts')
-rw-r--r--server/controllers/static.ts15
1 files changed, 7 insertions, 8 deletions
diff --git a/server/controllers/static.ts b/server/controllers/static.ts
index 8d9003a3e..3870ebfe9 100644
--- a/server/controllers/static.ts
+++ b/server/controllers/static.ts
@@ -2,9 +2,9 @@ import * as cors from 'cors'
2import * as express from 'express' 2import * as express from 'express'
3import { join } from 'path' 3import { join } from 'path'
4import { serveIndexHTML } from '@server/lib/client-html' 4import { serveIndexHTML } from '@server/lib/client-html'
5import { getRegisteredPlugins, getRegisteredThemes } from '@server/lib/config' 5import { ServerConfigManager } from '@server/lib/server-config-manager'
6import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' 6import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes'
7import { HttpNodeinfoDiasporaSoftwareNsSchema20 } from '../../shared/models/nodeinfo' 7import { HttpNodeinfoDiasporaSoftwareNsSchema20 } from '../../shared/models/nodeinfo/nodeinfo.model'
8import { root } from '../helpers/core-utils' 8import { root } from '../helpers/core-utils'
9import { CONFIG, isEmailEnabled } from '../initializers/config' 9import { CONFIG, isEmailEnabled } from '../initializers/config'
10import { 10import {
@@ -18,10 +18,9 @@ import {
18 WEBSERVER 18 WEBSERVER
19} from '../initializers/constants' 19} from '../initializers/constants'
20import { getThemeOrDefault } from '../lib/plugins/theme-utils' 20import { getThemeOrDefault } from '../lib/plugins/theme-utils'
21import { getEnabledResolutions } from '../lib/video-transcoding'
22import { asyncMiddleware } from '../middlewares' 21import { asyncMiddleware } from '../middlewares'
23import { cacheRoute } from '../middlewares/cache' 22import { cacheRoute } from '../middlewares/cache'
24import { UserModel } from '../models/account/user' 23import { UserModel } from '../models/user/user'
25import { VideoModel } from '../models/video/video' 24import { VideoModel } from '../models/video/video'
26import { VideoCommentModel } from '../models/video/video-comment' 25import { VideoCommentModel } from '../models/video/video-comment'
27 26
@@ -204,10 +203,10 @@ async function generateNodeinfo (req: express.Request, res: express.Response) {
204 } 203 }
205 }, 204 },
206 plugin: { 205 plugin: {
207 registered: getRegisteredPlugins() 206 registered: ServerConfigManager.Instance.getRegisteredPlugins()
208 }, 207 },
209 theme: { 208 theme: {
210 registered: getRegisteredThemes(), 209 registered: ServerConfigManager.Instance.getRegisteredThemes(),
211 default: getThemeOrDefault(CONFIG.THEME.DEFAULT, DEFAULT_THEME_NAME) 210 default: getThemeOrDefault(CONFIG.THEME.DEFAULT, DEFAULT_THEME_NAME)
212 }, 211 },
213 email: { 212 email: {
@@ -223,13 +222,13 @@ async function generateNodeinfo (req: express.Request, res: express.Response) {
223 webtorrent: { 222 webtorrent: {
224 enabled: CONFIG.TRANSCODING.WEBTORRENT.ENABLED 223 enabled: CONFIG.TRANSCODING.WEBTORRENT.ENABLED
225 }, 224 },
226 enabledResolutions: getEnabledResolutions('vod') 225 enabledResolutions: ServerConfigManager.Instance.getEnabledResolutions('vod')
227 }, 226 },
228 live: { 227 live: {
229 enabled: CONFIG.LIVE.ENABLED, 228 enabled: CONFIG.LIVE.ENABLED,
230 transcoding: { 229 transcoding: {
231 enabled: CONFIG.LIVE.TRANSCODING.ENABLED, 230 enabled: CONFIG.LIVE.TRANSCODING.ENABLED,
232 enabledResolutions: getEnabledResolutions('live') 231 enabledResolutions: ServerConfigManager.Instance.getEnabledResolutions('live')
233 } 232 }
234 }, 233 },
235 import: { 234 import: {