]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/videos/import.ts
Add ability to disable webtorrent
[github/Chocobozzz/PeerTube.git] / server / controllers / api / videos / import.ts
index 8879f3442e92d0246602c77206542b8f872f70ca..28ced58368b2939f0957d09cb0f69f0723793646 100644 (file)
@@ -190,8 +190,8 @@ function buildVideo (channelId: number, body: VideoImportCreate, importData: You
     category: body.category || importData.category,
     licence: body.licence || importData.licence,
     language: body.language || undefined,
-    commentsEnabled: body.commentsEnabled || true,
-    downloadEnabled: body.downloadEnabled || true,
+    commentsEnabled: body.commentsEnabled !== false, // If the value is not "false", the default is "true"
+    downloadEnabled: body.downloadEnabled !== false,
     waitTranscoding: body.waitTranscoding || false,
     state: VideoState.TO_IMPORT,
     nsfw: body.nsfw || importData.nsfw || false,