Bug fix logical and/or boolean selector
authorFrank Sträter <fstrater@beeldengeluid.nl>
Wed, 28 Aug 2019 10:31:55 +0000 (12:31 +0200)
committerChocobozzz <chocobozzz@cpy.re>
Wed, 28 Aug 2019 10:58:47 +0000 (12:58 +0200)
server/controllers/api/videos/import.ts

index 8879f3442e92d0246602c77206542b8f872f70ca..ebe8718c72955df2c1afd4eecfaa3037fbbfe42f 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 && true,
+    downloadEnabled: body.downloadEnabled && true,
     waitTranscoding: body.waitTranscoding || false,
     state: VideoState.TO_IMPORT,
     nsfw: body.nsfw || importData.nsfw || false,