mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Also check the lang in case insensitive
This commit is contained in:
parent
33e7f7384e
commit
2a9630258f
22658 changed files with 3562773 additions and 3562767 deletions
|
@ -1,33 +1,33 @@
|
|||
<?php
|
||||
//streamer config
|
||||
require_once '../videos/configuration.php';
|
||||
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 = [];
|
||||
$sql = "SELECT * FROM videos ";
|
||||
$res = sqlDAL::readSql($sql);
|
||||
$fullData = sqlDAL::fetchAllAssoc($res);
|
||||
$total = count($fullData);
|
||||
sqlDAL::close($res);
|
||||
$rows = [];
|
||||
if ($res != false) {
|
||||
$count = 0;
|
||||
foreach ($fullData as $key => $row) {
|
||||
$count++;
|
||||
$filename = $row['filename'];
|
||||
$totalDeleted = Video::deleteThumbs($filename, true, $checkIfIsCorrupted);
|
||||
if ($totalDeleted) {
|
||||
echo "{$total}/{$count} Thumbs deleted ($totalDeleted) from {$row['title']}".PHP_EOL;
|
||||
} else {
|
||||
echo "{$total}/{$count} Thumbs NOT deleted from {$row['title']}".PHP_EOL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
|
||||
}
|
||||
<?php
|
||||
//streamer config
|
||||
require_once '../videos/configuration.php';
|
||||
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 = [];
|
||||
$sql = "SELECT * FROM videos ";
|
||||
$res = sqlDAL::readSql($sql);
|
||||
$fullData = sqlDAL::fetchAllAssoc($res);
|
||||
$total = count($fullData);
|
||||
sqlDAL::close($res);
|
||||
$rows = [];
|
||||
if ($res != false) {
|
||||
$count = 0;
|
||||
foreach ($fullData as $key => $row) {
|
||||
$count++;
|
||||
$filename = $row['filename'];
|
||||
$totalDeleted = Video::deleteThumbs($filename, true, $checkIfIsCorrupted);
|
||||
if ($totalDeleted) {
|
||||
echo "{$total}/{$count} Thumbs deleted ($totalDeleted) from {$row['title']}".PHP_EOL;
|
||||
} else {
|
||||
echo "{$total}/{$count} Thumbs NOT deleted from {$row['title']}".PHP_EOL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue