X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fserver-commands%2Fserver%2Fconfig-command.ts;h=b94bd2625a9cefea6b01def9c5a20c32f90d03e6;hb=5e47f6ab984a7d00782e4c7030afffa1ba480add;hp=303fcab88adc02e8d1fc85877791a9e0410cd90c;hpb=b302c80dc0d9ba8eabef9ef6576efe36afc57584;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/server-commands/server/config-command.ts b/shared/server-commands/server/config-command.ts index 303fcab88..b94bd2625 100644 --- a/shared/server-commands/server/config-command.ts +++ b/shared/server-commands/server/config-command.ts @@ -5,8 +5,9 @@ import { AbstractCommand, OverrideCommandOptions } from '../shared/abstract-comm export class ConfigCommand extends AbstractCommand { - static getCustomConfigResolutions (enabled: boolean) { + static getCustomConfigResolutions (enabled: boolean, with0p = false) { return { + '0p': enabled && with0p, '144p': enabled, '240p': enabled, '360p': enabled, @@ -129,7 +130,8 @@ export class ConfigCommand extends AbstractCommand { }) } - enableTranscoding (webtorrent = true, hls = true) { + // TODO: convert args to object + enableTranscoding (webtorrent = true, hls = true, with0p = false) { return this.updateExistingSubConfig({ newConfig: { transcoding: { @@ -138,7 +140,7 @@ export class ConfigCommand extends AbstractCommand { allowAudioFiles: true, allowAdditionalExtensions: true, - resolutions: ConfigCommand.getCustomConfigResolutions(true), + resolutions: ConfigCommand.getCustomConfigResolutions(true, with0p), webtorrent: { enabled: webtorrent @@ -151,6 +153,7 @@ export class ConfigCommand extends AbstractCommand { }) } + // TODO: convert args to object enableMinimumTranscoding (webtorrent = true, hls = true) { return this.updateExistingSubConfig({ newConfig: { @@ -173,6 +176,37 @@ export class ConfigCommand extends AbstractCommand { }) } + enableRemoteTranscoding () { + return this.updateExistingSubConfig({ + newConfig: { + transcoding: { + remoteRunners: { + enabled: true + } + }, + live: { + transcoding: { + remoteRunners: { + enabled: true + } + } + } + } + }) + } + + enableRemoteStudio () { + return this.updateExistingSubConfig({ + newConfig: { + videoStudio: { + remoteRunners: { + enabled: true + } + } + } + }) + } + // --------------------------------------------------------------------------- enableStudio () { @@ -363,6 +397,9 @@ export class ConfigCommand extends AbstractCommand { }, transcoding: { enabled: true, + remoteRunners: { + enabled: false + }, allowAdditionalExtensions: true, allowAudioFiles: true, threads: 1, @@ -398,6 +435,9 @@ export class ConfigCommand extends AbstractCommand { maxUserLives: 50, transcoding: { enabled: true, + remoteRunners: { + enabled: false + }, threads: 4, profile: 'default', resolutions: { @@ -414,7 +454,10 @@ export class ConfigCommand extends AbstractCommand { } }, videoStudio: { - enabled: false + enabled: false, + remoteRunners: { + enabled: false + } }, import: { videos: {