mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Embed cols
This commit is contained in:
parent
facda502cb
commit
6e2423942b
1 changed files with 12 additions and 0 deletions
|
@ -10,6 +10,18 @@ ob_end_flush();
|
||||||
|
|
||||||
function download($url, $filename, $path, $forceDownload=false){
|
function download($url, $filename, $path, $forceDownload=false){
|
||||||
$parts = explode("/{$filename}/", $url);
|
$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]);
|
$parts2 = explode('?', $parts[1]);
|
||||||
$file = $parts2[0];
|
$file = $parts2[0];
|
||||||
$destination = $path.$file;
|
$destination = $path.$file;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue