git.cweiske.de
/
playVideoOnDreamboxProxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
241a230
)
Show error when youtube-dl is not installed
author
Christian Weiske
<cweiske@cweiske.de>
Tue, 13 Nov 2018 19:46:22 +0000
(20:46 +0100)
committer
Christian Weiske
<cweiske@cweiske.de>
Tue, 13 Nov 2018 19:46:22 +0000
(20:46 +0100)
www/functions.php
patch
|
blob
|
history
diff --git
a/www/functions.php
b/www/functions.php
index 2d4e515e2e1c5067b499623f2c47dbafa4d96568..43c3a7771a6148cc38800303d93f0e651c12230c 100644
(file)
--- 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)'