1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
Oinktube/install/updateDiskUsage.php
Caleb Mazalevskis 27a7925b98
Refactor.
2022-01-06 21:44:29 +08:00

19 lines
544 B
PHP

<?php
//streamer config
require_once '../videos/configuration.php';
if (!isCommandLineInterface()) {
return die('Command Line only');
}
$global['rowCount'] = 99999;
$total = Video::getTotalVideos("", false, true, true, false, false);
$videos = Video::getAllVideosLight("", false, true, false);
$count = 0;
foreach ($videos as $value) {
$count++;
$updated = Video::updateFilesize($value['id']);
echo "{$count}/{$total} (".($updated ? "success" : "fail").") [{$value['id']}] {$value['title']}".PHP_EOL;
ob_flush();
}
die();