X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fextra-utils%2Fserver%2Fconfig.ts;h=b7011085260e64a5b15e9b0314db9b8bd6c5b6b0;hb=428ccb8b7a44ce60cabb7401a5464cf5fcbd4dba;hp=efe569243b01d47324f943041f3ca039a333afbc;hpb=9129b7694d577322327ee79e9b9aa64deee92765;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/extra-utils/server/config.ts b/shared/extra-utils/server/config.ts index efe569243..b70110852 100644 --- a/shared/extra-utils/server/config.ts +++ b/shared/extra-utils/server/config.ts @@ -90,6 +90,9 @@ function updateCustomSubConfig (url: string, token: string, newConfig: DeepParti }, captions: { size: 3 + }, + torrents: { + size: 4 } }, signup: { @@ -220,6 +223,18 @@ function updateCustomSubConfig (url: string, token: string, newConfig: DeepParti return updateCustomConfig(url, token, updateParams) } +function getCustomConfigResolutions (enabled: boolean) { + return { + '240p': enabled, + '360p': enabled, + '480p': enabled, + '720p': enabled, + '1080p': enabled, + '1440p': enabled, + '2160p': enabled + } +} + function deleteCustomConfig (url: string, token: string, statusCodeExpected = HttpStatusCode.OK_200) { const path = '/api/v1/config/custom' @@ -239,5 +254,6 @@ export { updateCustomConfig, getAbout, deleteCustomConfig, - updateCustomSubConfig + updateCustomSubConfig, + getCustomConfigResolutions }