X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fserver-commands%2Fserver%2Fconfig-command.ts;h=5320dead4705bfe42cbba88d944ce33e1a4174f8;hb=010382b6037cff5d0ed16fa8b158691439fac9b7;hp=e47a0d34617ca0a5a2ea0d41f29d124c2d8ae090;hpb=4495806f2f5045a0626ab64f43b5fc4deefe2ac0;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/server-commands/server/config-command.ts b/shared/server-commands/server/config-command.ts index e47a0d346..5320dead4 100644 --- a/shared/server-commands/server/config-command.ts +++ b/shared/server-commands/server/config-command.ts @@ -60,7 +60,7 @@ export class ConfigCommand extends AbstractCommand { transcoding: { enabled: false }, - videoEditor: { + videoStudio: { enabled: false } } @@ -111,6 +111,16 @@ export class ConfigCommand extends AbstractCommand { }) } + enableStudio () { + return this.updateExistingSubConfig({ + newConfig: { + videoStudio: { + enabled: true + } + } + }) + } + getConfig (options: OverrideCommandOptions = {}) { const path = '/api/v1/config' @@ -123,6 +133,21 @@ export class ConfigCommand extends AbstractCommand { }) } + async getIndexHTMLConfig (options: OverrideCommandOptions = {}) { + const text = await this.getRequestText({ + ...options, + + path: '/', + implicitToken: false, + defaultExpectedStatus: HttpStatusCode.OK_200 + }) + + const match = text.match('') + + // We parse the string twice, first to extract the string and then to extract the JSON + return JSON.parse(JSON.parse(match[1])) as ServerConfig + } + getAbout (options: OverrideCommandOptions = {}) { const path = '/api/v1/config/about' @@ -314,7 +339,7 @@ export class ConfigCommand extends AbstractCommand { } } }, - videoEditor: { + videoStudio: { enabled: false }, import: { @@ -331,7 +356,7 @@ export class ConfigCommand extends AbstractCommand { trending: { videos: { algorithms: { - enabled: [ 'best', 'hot', 'most-viewed', 'most-liked' ], + enabled: [ 'hot', 'most-viewed', 'most-liked' ], default: 'hot' } }