1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +02:00

Add runner server tests

This commit is contained in:
Chocobozzz 2023-04-21 15:00:01 +02:00 committed by Chocobozzz
parent 2fe978744e
commit d102de1b38
95 changed files with 4215 additions and 648 deletions

View file

@ -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,25 @@ export class ConfigCommand extends AbstractCommand {
})
}
enableRemoteTranscoding () {
return this.updateExistingSubConfig({
newConfig: {
transcoding: {
remoteRunners: {
enabled: true
}
},
live: {
transcoding: {
remoteRunners: {
enabled: true
}
}
}
}
})
}
// ---------------------------------------------------------------------------
enableStudio () {
@ -363,6 +385,9 @@ export class ConfigCommand extends AbstractCommand {
},
transcoding: {
enabled: true,
remoteRunners: {
enabled: false
},
allowAdditionalExtensions: true,
allowAudioFiles: true,
threads: 1,
@ -398,6 +423,9 @@ export class ConfigCommand extends AbstractCommand {
maxUserLives: 50,
transcoding: {
enabled: true,
remoteRunners: {
enabled: false
},
threads: 4,
profile: 'default',
resolutions: {