Better error reporting for errors when sending video to dreambox
[playVideoOnDreamboxProxy.git] / www / play.php
index 36f3e6c56e7009e02144f488b9d675f943d28eb3..810995123a9881030249c296421364ec3b657b45 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 $youtubedlPath = '/usr/bin/youtube-dl';
-$dreamboxHost  = 'dreambox';
+$dreamboxUrl   = 'http://dreambox';
 
 require_once __DIR__ . '/functions.php';
 $cfgFile = __DIR__ . '/../data/config.php';
@@ -8,6 +8,8 @@ if (file_exists($cfgFile)) {
     include $cfgFile;
 }
 
+set_error_handler('errorHandlerStore');
+
 $pageUrl  = getPageUrl();
 $json     = getYoutubeDlJson($pageUrl, $youtubedlPath);
 $videoUrl = extractVideoUrlFromJson($json);
@@ -16,7 +18,7 @@ if (php_sapi_name() == 'cli') {
 } else {
     header('Video-URL: ' . $videoUrl);
 }
-playVideoOnDreambox($videoUrl, $dreamboxHost);
+playVideoOnDreambox($videoUrl, $dreamboxUrl);
 
 
 function errorInput($msg)