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:
21d2834
)
Do not try to parse stderr data + check if we really have an URL
author
Christian Weiske
<cweiske@cweiske.de>
Thu, 19 Oct 2017 19:04:28 +0000
(21:04 +0200)
committer
Christian Weiske
<cweiske@cweiske.de>
Thu, 19 Oct 2017 19:04:28 +0000
(21:04 +0200)
www/play.php
patch
|
blob
|
history
diff --git
a/www/play.php
b/www/play.php
index a9adc5b8a83953a35a69eb81e96410d7033101d6..ce221e01566964b75217c8e0973a0a2d5e3483eb 100644
(file)
--- a/
www/play.php
+++ b/
www/play.php
@@
-45,7
+45,7
@@
function extractVideoUrl($pageUrl, $youtubedlPath)
. ' --quiet'
. ' --dump-json'
. ' ' . escapeshellarg($pageUrl)
- . ' 2>
&1
';
+ . ' 2>
/dev/null
';
$lastLine = exec($cmd, $output, $exitCode);
if ($exitCode !== 0) {
@@
-75,6
+75,13
@@
function extractVideoUrl($pageUrl, $youtubedlPath)
//use URL chosen by youtube-dl
$url = $data->url;
}
+
+ if ($url == '') {
+ errorOut(
+ 'No video URL found',
+ '406 No video URL found'
+ );
+ }
return $url;
}