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

fixDummyfiles

This commit is contained in:
DanieL 2022-04-07 18:27:18 -03:00
parent 8d398a9845
commit 507daa7e62

View file

@ -14,10 +14,10 @@ function download($url, $filename, $path, $forceDownload=false){
$file = $parts2[0];
$destination = $path.$file;
if($forceDownload || !file_exists($destination)){
_error_log("importChannel::download $url [$destination]");
_error_log("importChannel::download [$destination]");
return wget($url, $destination, true);
}else{
_error_log("importChannel::download skipped $url [$destination]");
_error_log("importChannel::download skipped [$destination]");
}
return false;
}
@ -103,6 +103,7 @@ while($hasNewContent){
download($value->images->thumbsGif, $value->filename, $path);
foreach ($value->videos->mp4 as $value2) {
_error_log("importChannel: APIURL = $APIURL");
download($value2, $value->filename, $path);
}
$video->setStatus(Video::$statusActive);