1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 19:42:38 +02:00

Debug download MP4

This commit is contained in:
Daniel 2021-10-14 17:18:52 -03:00
parent 45527fd611
commit 13bd5c202b

View file

@ -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);
}