From fb90545d927eb732e15bdfc5aba378631fc995a9 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Fri, 6 Jul 2018 10:36:53 +0200 Subject: [PATCH] feat: Add STREAM environment variable so stream mode can be enabled on Heroku See #178 --- app.json | 4 ++++ classes/Config.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app.json b/app.json index b9584fe..bf59617 100644 --- a/app.json +++ b/app.json @@ -32,6 +32,10 @@ "PYTHON": { "description": "Path to python binary", "value": "/app/.heroku/python/bin/python" + }, + "STREAM": { + "description": "Enable stream mode", + "value": "false" } }, "website": "https://alltubedownload.net/" diff --git a/classes/Config.php b/classes/Config.php index 0a06d55..40c0de5 100644 --- a/classes/Config.php +++ b/classes/Config.php @@ -144,7 +144,7 @@ class Config */ private function getEnv() { - foreach (['CONVERT', 'PYTHON', 'AUDIO_BITRATE'] as $var) { + foreach (['CONVERT', 'PYTHON', 'AUDIO_BITRATE', 'STREAM'] as $var) { $env = getenv($var); if ($env) { $prop = lcfirst(str_replace('_', '', ucwords(strtolower($var), '_')));