X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fserver-commands%2Fserver%2Fconfig-command.ts;h=c0042060b5006f6e915b93e4bda88bc088773d9d;hb=55f0a7a76249dda79d2815bd5c1d81ccd8bc7002;hp=797231b1d2edadf2fe785daf46a60ea590edae5d;hpb=c55e3d7227fe1453869e309025996b9d75256d5d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/server-commands/server/config-command.ts b/shared/server-commands/server/config-command.ts index 797231b1d..c0042060b 100644 --- a/shared/server-commands/server/config-command.ts +++ b/shared/server-commands/server/config-command.ts @@ -59,6 +59,9 @@ export class ConfigCommand extends AbstractCommand { newConfig: { transcoding: { enabled: false + }, + videoEditor: { + enabled: false } } }) @@ -69,6 +72,10 @@ export class ConfigCommand extends AbstractCommand { newConfig: { transcoding: { enabled: true, + + allowAudioFiles: true, + allowAdditionalExtensions: true, + resolutions: ConfigCommand.getCustomConfigResolutions(true), webtorrent: { @@ -82,6 +89,28 @@ export class ConfigCommand extends AbstractCommand { }) } + enableMinimumTranscoding (webtorrent = true, hls = true) { + return this.updateExistingSubConfig({ + newConfig: { + transcoding: { + enabled: true, + resolutions: { + ...ConfigCommand.getCustomConfigResolutions(false), + + '240p': true + }, + + webtorrent: { + enabled: webtorrent + }, + hls: { + enabled: hls + } + } + } + }) + } + getConfig (options: OverrideCommandOptions = {}) { const path = '/api/v1/config' @@ -148,7 +177,7 @@ export class ConfigCommand extends AbstractCommand { async updateExistingSubConfig (options: OverrideCommandOptions & { newConfig: DeepPartial }) { - const existing = await this.getCustomConfig(options) + const existing = await this.getCustomConfig({ ...options, expectedStatus: HttpStatusCode.OK_200 }) return this.updateCustomConfig({ ...options, newCustomConfig: merge({}, existing, options.newConfig) }) } @@ -282,6 +311,9 @@ export class ConfigCommand extends AbstractCommand { } } }, + videoEditor: { + enabled: false + }, import: { videos: { concurrency: 3,