diff --git a/view/hls.php b/view/hls.php index d38a25157..1fa792c70 100644 --- a/view/hls.php +++ b/view/hls.php @@ -1,59 +1,83 @@ isTokenValid($_GET['token'], $_GET['videoDirectory'], $_GET['videoDirectory']); } } else if (!empty($_GET['globalToken'])) { $tokenIsValid = verifyToken($_GET['globalToken']); } $newContent = ""; // if is using a CDN I can not check if the user is logged if (isAVideoEncoderOnSameDomain() || $tokenIsValid || !empty($advancedCustom->videosCDN) || User::canWatchVideo($video['id'])) { if (!empty($_GET['download'])) { downloadHLS($_GET['file']); }else if (!empty($_GET['playHLSasMP4'])) { playHLSasMP4($_GET['file']); } else { $filename = pathToRemoteURL($filename); $content = file_get_contents($filename); $newContent = str_replace('{$pathToVideo}', "{$global['webSiteRootURL']}videos/{$_GET['videoDirectory']}/../", $content); if (!empty($_GET['token'])) { $newContent = str_replace('/index.m3u8', "/index.m3u8?token={$_GET['token']}", $newContent); } else if (!empty($_GET['globalToken'])) { $newContent = str_replace('/index.m3u8', "/index.m3u8?globalToken={$_GET['globalToken']}", $newContent); } } } else { $newContent = "HLS.php Can not see video [{$video['id']}] ({$_GET['videoDirectory']}) "; $newContent .= $tokenIsValid ? "" : " tokenInvalid"; - $newContent .= User::canWatchVideo($video['id']) ? "" : " cannot watch"; + $newContent .= User::canWatchVideo($video['id']) ? "" : " cannot watch ({$video['id']})"; $newContent .= " " . date("Y-m-d H:i:s"); } header("Content-Type: text/plain"); echo $newContent; diff --git a/view/maintanance.html b/view/maintanance.html index 33a06fbcb..35a6df3ac 100644 --- a/view/maintanance.html +++ b/view/maintanance.html @@ -1,79 +1,78 @@