mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 17:59:55 +02:00
fixDummyfiles
This commit is contained in:
parent
8d398a9845
commit
507daa7e62
1 changed files with 3 additions and 2 deletions
|
@ -14,10 +14,10 @@ function download($url, $filename, $path, $forceDownload=false){
|
||||||
$file = $parts2[0];
|
$file = $parts2[0];
|
||||||
$destination = $path.$file;
|
$destination = $path.$file;
|
||||||
if($forceDownload || !file_exists($destination)){
|
if($forceDownload || !file_exists($destination)){
|
||||||
_error_log("importChannel::download $url [$destination]");
|
_error_log("importChannel::download [$destination]");
|
||||||
return wget($url, $destination, true);
|
return wget($url, $destination, true);
|
||||||
}else{
|
}else{
|
||||||
_error_log("importChannel::download skipped $url [$destination]");
|
_error_log("importChannel::download skipped [$destination]");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -103,6 +103,7 @@ while($hasNewContent){
|
||||||
download($value->images->thumbsGif, $value->filename, $path);
|
download($value->images->thumbsGif, $value->filename, $path);
|
||||||
|
|
||||||
foreach ($value->videos->mp4 as $value2) {
|
foreach ($value->videos->mp4 as $value2) {
|
||||||
|
_error_log("importChannel: APIURL = $APIURL");
|
||||||
download($value2, $value->filename, $path);
|
download($value2, $value->filename, $path);
|
||||||
}
|
}
|
||||||
$video->setStatus(Video::$statusActive);
|
$video->setStatus(Video::$statusActive);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue