mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 19:42:38 +02:00
Debug download MP4
This commit is contained in:
parent
45527fd611
commit
13bd5c202b
1 changed files with 10 additions and 6 deletions
|
@ -6074,8 +6074,8 @@ function downloadHLS($filepath) {
|
|||
|
||||
if (!empty($output['error'])) {
|
||||
$msg = 'downloadHLS was not possible';
|
||||
if(User::isAdmin()){
|
||||
$msg.='<br>'."m3u8ToMP4($filepath) return empty<br>".nl2br($output['msg']);
|
||||
if (User::isAdmin()) {
|
||||
$msg .= '<br>' . "m3u8ToMP4($filepath) return empty<br>" . nl2br($output['msg']);
|
||||
}
|
||||
_error_log("downloadHLS: m3u8ToMP4($filepath) return empty");
|
||||
die($msg);
|
||||
|
@ -6120,8 +6120,8 @@ function playHLSasMP4($filepath) {
|
|||
if (!empty($output['error'])) {
|
||||
|
||||
$msg = 'playHLSasMP4 was not possible';
|
||||
if(User::isAdmin()){
|
||||
$msg.='<br>'."m3u8ToMP4($filepath) return empty<br>".nl2br($output['msg']);
|
||||
if (User::isAdmin()) {
|
||||
$msg .= '<br>' . "m3u8ToMP4($filepath) return empty<br>" . nl2br($output['msg']);
|
||||
}
|
||||
die($msg);
|
||||
}
|
||||
|
@ -6154,8 +6154,12 @@ function m3u8ToMP4($input) {
|
|||
}
|
||||
_error_log("downloadHLS: m3u8ToMP4($input)");
|
||||
//var_dump(!preg_match('/^http/i', $input), filesize($input), preg_match('/.m3u8$/i', $input));
|
||||
if (!preg_match('/^http/i', $input) && (filesize($input) <= 10 || preg_match('/.m3u8$/i', $input))) { // dummy file
|
||||
$ism3u8 = preg_match('/.m3u8$/i', $input);
|
||||
if (!preg_match('/^http/i', $input) && (filesize($input) <= 10 || $ism3u8)) { // dummy file
|
||||
$filepath = escapeshellcmd(pathToRemoteURL($input, true, true));
|
||||
if ($ism3u8 && !preg_match('/.m3u8$/i', $filepath)) {
|
||||
$filepath = addLastSlash($filepath) . 'index.m3u8';
|
||||
}
|
||||
} else {
|
||||
$filepath = escapeshellcmd($input);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue