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

22 lines
500 B
PHP

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