]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/server/config.ts
Refactor a little bit live tests
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / server / config.ts
index db5a473ca616519cc59365cb84ee9f848b8538d8..b7011085260e64a5b15e9b0314db9b8bd6c5b6b0 100644 (file)
@@ -90,6 +90,9 @@ function updateCustomSubConfig (url: string, token: string, newConfig: DeepParti
       },
       captions: {
         size: 3
+      },
+      torrents: {
+        size: 4
       }
     },
     signup: {
@@ -112,6 +115,7 @@ function updateCustomSubConfig (url: string, token: string, newConfig: DeepParti
       allowAdditionalExtensions: true,
       allowAudioFiles: true,
       threads: 1,
+      concurrency: 3,
       profile: 'default',
       resolutions: {
         '0p': false,
@@ -153,6 +157,7 @@ function updateCustomSubConfig (url: string, token: string, newConfig: DeepParti
     },
     import: {
       videos: {
+        concurrency: 3,
         http: {
           enabled: false
         },
@@ -218,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'
 
@@ -237,5 +254,6 @@ export {
   updateCustomConfig,
   getAbout,
   deleteCustomConfig,
-  updateCustomSubConfig
+  updateCustomSubConfig,
+  getCustomConfigResolutions
 }