feat: Add STREAM environment variable so stream mode can be enabled on Heroku

See #178
This commit is contained in:
Pierre Rudloff 2018-07-06 10:36:53 +02:00
parent 298848a2f1
commit fb90545d92
2 changed files with 5 additions and 1 deletions

View File

@ -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/"

View File

@ -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), '_')));