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

Improve trhe deletethumbs

This commit is contained in:
Daniel 2021-12-08 18:33:06 -03:00
parent b31c9d2ceb
commit 0dd7422dd0
3 changed files with 48 additions and 6 deletions

View file

@ -7,7 +7,7 @@ require_once $global['systemRootPath'] . 'objects/video.php';
if (!isCommandLineInterface()) {
return die('Command Line only');
}
$checkIfIsCorrupted = intval(@$argv[1]);
$users_ids = array();
$sql = "SELECT * FROM videos ";
$res = sqlDAL::readSql($sql);
@ -20,7 +20,7 @@ if ($res != false) {
foreach ($fullData as $key => $row) {
$count++;
$filename = $row['filename'];
Video::deleteThumbs($filename, true);
Video::deleteThumbs($filename, true, $checkIfIsCorrupted);
echo "{$total}/{$count} Thumbs deleted from {$row['title']}".PHP_EOL;
ob_flush();
}