1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
daniel 2020-05-16 15:35:51 -03:00
parent 4f8e3d674f
commit 00c895068c

View file

@ -0,0 +1,29 @@
<?php
//streamer config
require_once '../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/video.php';
if (!isCommandLineInterface()) {
return die('Command Line only');
}
$users_ids = array();
$sql = "SELECT * FROM videos ";
$res = sqlDAL::readSql($sql);
$fullData = sqlDAL::fetchAllAssoc($res);
$total = count($fullData);
sqlDAL::close($res);
$rows = array();
if ($res != false) {
$count = 0;
foreach ($fullData as $key => $row) {
$count++;
$filename = $row['filename'];
Video::deleteThumbs($filename, true);
echo "{$total}/{$count} Thumbs deleted from {$row['title']}".PHP_EOL;
ob_flush();
}
} else {
die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
}