]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/server-commands/server/config-command.ts
Add signup approval API REST doc
[github/Chocobozzz/PeerTube.git] / shared / server-commands / server / config-command.ts
index 3803aaf9527e419eb331653550085f2533708d3b..1c2315ed15685f249d52fa641360b97a8b5945bf 100644 (file)
@@ -18,17 +18,25 @@ export class ConfigCommand extends AbstractCommand {
     }
   }
 
+  disableImports () {
+    return this.setImportsEnabled(false)
+  }
+
   enableImports () {
+    return this.setImportsEnabled(true)
+  }
+
+  private setImportsEnabled (enabled: boolean) {
     return this.updateExistingSubConfig({
       newConfig: {
         import: {
           videos: {
             http: {
-              enabled: true
+              enabled
             },
 
             torrent: {
-              enabled: true
+              enabled
             }
           }
         }
@@ -36,6 +44,26 @@ export class ConfigCommand extends AbstractCommand {
     })
   }
 
+  private setChannelSyncEnabled (enabled: boolean) {
+    return this.updateExistingSubConfig({
+      newConfig: {
+        import: {
+          videoChannelSynchronization: {
+            enabled
+          }
+        }
+      }
+    })
+  }
+
+  enableChannelSync () {
+    return this.setChannelSyncEnabled(true)
+  }
+
+  disableChannelSync () {
+    return this.setChannelSyncEnabled(false)
+  }
+
   enableLive (options: {
     allowReplay?: boolean
     transcoding?: boolean
@@ -310,6 +338,7 @@ export class ConfigCommand extends AbstractCommand {
           '1440p': false,
           '2160p': false
         },
+        alwaysTranscodeOriginalResolution: true,
         webtorrent: {
           enabled: true
         },
@@ -339,7 +368,8 @@ export class ConfigCommand extends AbstractCommand {
             '1080p': true,
             '1440p': true,
             '2160p': true
-          }
+          },
+          alwaysTranscodeOriginalResolution: true
         }
       },
       videoStudio: {
@@ -354,6 +384,10 @@ export class ConfigCommand extends AbstractCommand {
           torrent: {
             enabled: false
           }
+        },
+        videoChannelSynchronization: {
+          enabled: false,
+          maxPerUser: 10
         }
       },
       trending: {