Update config.ts
authorLiPeK <lipek002@gmail.com>
Mon, 27 May 2019 13:11:38 +0000 (15:11 +0200)
committerChocobozzz <chocobozzz@cpy.re>
Tue, 28 May 2019 08:12:07 +0000 (10:12 +0200)
This should fix https://github.com/Chocobozzz/PeerTube/issues/1850

server/controllers/api/config.ts

index d9ce6a15330e534f3e284f384a549ef4ca35ef65..27c416a12bc75c995ca83394056c0e6198518275 100644 (file)
@@ -51,7 +51,7 @@ async function getConfig (req: express.Request, res: express.Response) {
   if (serverCommit === undefined) serverCommit = await getServerCommit()
 
   const enabledResolutions = Object.keys(CONFIG.TRANSCODING.RESOLUTIONS)
-   .filter(key => CONFIG.TRANSCODING.ENABLED === CONFIG.TRANSCODING.RESOLUTIONS[key] === true)
+   .filter(key => CONFIG.TRANSCODING.ENABLED && CONFIG.TRANSCODING.RESOLUTIONS[key] === true)
    .map(r => parseInt(r, 10))
 
   const json: ServerConfig = {