]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/server/config.ts
Reorganize plugin models
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / server / config.ts
index efe569243b01d47324f943041f3ca039a333afbc..b7011085260e64a5b15e9b0314db9b8bd6c5b6b0 100644 (file)
@@ -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
 }