]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/server/config.ts
Channel sync (#5135)
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / config.ts
index 565b2953acf3a057ccd22150fe973a5ebfd99e2e..fc871116154d0aab9a28bc3287e6cda68d9e545e 100644 (file)
@@ -77,11 +77,13 @@ function checkInitialConfig (server: PeerTubeServer, data: CustomConfig) {
   expect(data.transcoding.resolutions['1080p']).to.be.true
   expect(data.transcoding.resolutions['1440p']).to.be.true
   expect(data.transcoding.resolutions['2160p']).to.be.true
+  expect(data.transcoding.alwaysTranscodeOriginalResolution).to.be.true
   expect(data.transcoding.webtorrent.enabled).to.be.true
   expect(data.transcoding.hls.enabled).to.be.true
 
   expect(data.live.enabled).to.be.false
   expect(data.live.allowReplay).to.be.false
+  expect(data.live.latencySetting.enabled).to.be.true
   expect(data.live.maxDuration).to.equal(-1)
   expect(data.live.maxInstanceLives).to.equal(20)
   expect(data.live.maxUserLives).to.equal(3)
@@ -96,8 +98,9 @@ function checkInitialConfig (server: PeerTubeServer, data: CustomConfig) {
   expect(data.live.transcoding.resolutions['1080p']).to.be.false
   expect(data.live.transcoding.resolutions['1440p']).to.be.false
   expect(data.live.transcoding.resolutions['2160p']).to.be.false
+  expect(data.live.transcoding.alwaysTranscodeOriginalResolution).to.be.true
 
-  expect(data.videoEditor.enabled).to.be.false
+  expect(data.videoStudio.enabled).to.be.false
 
   expect(data.import.videos.concurrency).to.equal(2)
   expect(data.import.videos.http.enabled).to.be.true
@@ -180,11 +183,13 @@ function checkUpdatedConfig (data: CustomConfig) {
   expect(data.transcoding.resolutions['720p']).to.be.false
   expect(data.transcoding.resolutions['1080p']).to.be.false
   expect(data.transcoding.resolutions['2160p']).to.be.false
+  expect(data.transcoding.alwaysTranscodeOriginalResolution).to.be.false
   expect(data.transcoding.hls.enabled).to.be.false
   expect(data.transcoding.webtorrent.enabled).to.be.true
 
   expect(data.live.enabled).to.be.true
   expect(data.live.allowReplay).to.be.true
+  expect(data.live.latencySetting.enabled).to.be.false
   expect(data.live.maxDuration).to.equal(5000)
   expect(data.live.maxInstanceLives).to.equal(-1)
   expect(data.live.maxUserLives).to.equal(10)
@@ -198,8 +203,9 @@ function checkUpdatedConfig (data: CustomConfig) {
   expect(data.live.transcoding.resolutions['720p']).to.be.true
   expect(data.live.transcoding.resolutions['1080p']).to.be.true
   expect(data.live.transcoding.resolutions['2160p']).to.be.true
+  expect(data.live.transcoding.alwaysTranscodeOriginalResolution).to.be.false
 
-  expect(data.videoEditor.enabled).to.be.true
+  expect(data.videoStudio.enabled).to.be.true
 
   expect(data.import.videos.concurrency).to.equal(4)
   expect(data.import.videos.http.enabled).to.be.false
@@ -316,6 +322,7 @@ const newCustomConfig: CustomConfig = {
       '1440p': false,
       '2160p': false
     },
+    alwaysTranscodeOriginalResolution: false,
     webtorrent: {
       enabled: true
     },
@@ -326,6 +333,9 @@ const newCustomConfig: CustomConfig = {
   live: {
     enabled: true,
     allowReplay: true,
+    latencySetting: {
+      enabled: false
+    },
     maxDuration: 5000,
     maxInstanceLives: -1,
     maxUserLives: 10,
@@ -342,10 +352,11 @@ const newCustomConfig: CustomConfig = {
         '1080p': true,
         '1440p': true,
         '2160p': true
-      }
+      },
+      alwaysTranscodeOriginalResolution: false
     }
   },
-  videoEditor: {
+  videoStudio: {
     enabled: true
   },
   import: {
@@ -357,12 +368,16 @@ const newCustomConfig: CustomConfig = {
       torrent: {
         enabled: false
       }
+    },
+    videoChannelSynchronization: {
+      enabled: false,
+      maxPerUser: 10
     }
   },
   trending: {
     videos: {
       algorithms: {
-        enabled: [ 'best', 'hot', 'most-viewed', 'most-liked' ],
+        enabled: [ 'hot', 'most-viewed', 'most-liked' ],
         default: 'hot'
       }
     }