From: Christian Weiske Date: Tue, 13 Nov 2018 19:46:22 +0000 (+0100) Subject: Show error when youtube-dl is not installed X-Git-Tag: v1.0.0~2 X-Git-Url: https://git.cweiske.de/playVideoOnDreamboxProxy.git/commitdiff_plain/292869f170ef28b227d6f6cc06b80666cf011477 Show error when youtube-dl is not installed --- diff --git a/www/functions.php b/www/functions.php index 2d4e515..43c3a77 100644 --- a/www/functions.php +++ b/www/functions.php @@ -37,7 +37,12 @@ function getYoutubeDlJson($pageUrl, $youtubedlPath) $lastLine = exec($cmd, $output, $exitCode); if ($exitCode !== 0) { - if (strpos($lastLine, 'Unsupported URL') !== false) { + if ($exitCode === 127) { + errorOut( + 'youtube-dl not found at ' . $youtubedlPath, + '500 youtube-dl not found' + ); + } else if (strpos($lastLine, 'Unsupported URL') !== false) { errorOut( 'Unsupported URL at ' . $pageUrl, '406 Unsupported URL (No video found)'