X-Git-Url: https://git.cweiske.de/playVideoOnDreamboxProxy.git/blobdiff_plain/e49228d52d2c0ef42444b20ffcd543241bdf485c..refs/heads/master:/www/play.php diff --git a/www/play.php b/www/play.php index d96764d..0fdb243 100644 --- a/www/play.php +++ b/www/play.php @@ -18,7 +18,7 @@ if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'GET') { set_error_handler('errorHandlerStore'); -$pageUrl = getPageUrl(); +[$pageUrl, $dryRun] = getPageUrl(); $json = getYoutubeDlJson($pageUrl, $youtubedlPath); $videoUrl = extractVideoUrlFromJson($json); if (php_sapi_name() == 'cli') { @@ -26,7 +26,9 @@ if (php_sapi_name() == 'cli') { } else { header('Video-URL: ' . $videoUrl); } -playVideoOnDreambox($videoUrl, $dreamboxUrl); +if (!$dryRun) { + playVideoOnDreambox($videoUrl, $dreamboxUrl); +} function errorInput($msg)