diff --git a/install/deleteThumbsFiles.php b/install/deleteThumbsFiles.php index 1b385dd9fc..7c249552ec 100644 --- a/install/deleteThumbsFiles.php +++ b/install/deleteThumbsFiles.php @@ -7,6 +7,7 @@ require_once $global['systemRootPath'] . 'objects/video.php'; if (!isCommandLineInterface()) { return die('Command Line only'); } +ob_end_flush(); $checkIfIsCorrupted = intval(@$argv[1]); echo "checkIfIsCorrupted = $checkIfIsCorrupted".PHP_EOL; $users_ids = array(); @@ -23,7 +24,6 @@ if ($res != false) { $filename = $row['filename']; Video::deleteThumbs($filename, true, $checkIfIsCorrupted); echo "{$total}/{$count} Thumbs deleted from {$row['title']}".PHP_EOL; - ob_flush(); } } else { die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); diff --git a/objects/video.php b/objects/video.php index e37cfbb35f..fc95b9376b 100644 --- a/objects/video.php +++ b/objects/video.php @@ -4195,7 +4195,7 @@ if (!class_exists('Video')) { $files = glob("{$filePath}*_thumbs*.jpg"); foreach ($files as $file) { if (file_exists($file)) { - if($checkIfIsCorrupted && !isImageCorrupted($image_path)){ + if($checkIfIsCorrupted && !isImageCorrupted($file)){ continue; } if ($doNotDeleteSprit && strpos($file, '_thumbsSprit.jpg') !== false) {