1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00

Embed cols

This commit is contained in:
DanieL 2022-04-08 19:20:18 -03:00
parent facda502cb
commit 6e2423942b

View file

@ -10,6 +10,18 @@ ob_end_flush();
function download($url, $filename, $path, $forceDownload=false){
$parts = explode("/{$filename}/", $url);
if(empty($parts[1])){
if(preg_match("/\.mp3$/", $url)){
$parts[1] = "{$filename}.mp3";
}
}
if(empty($parts[1])){
_error_log("importChannel::download ERROR on download {$url}");
return false;
}
$parts2 = explode('?', $parts[1]);
$file = $parts2[0];
$destination = $path.$file;