1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
This commit is contained in:
DanieL 2023-02-17 14:46:34 -03:00
parent 16746017f0
commit 21d3f82c0d

View file

@ -0,0 +1,29 @@
<?php
//streamer config
require_once '../videos/configuration.php';
if (!isCommandLineInterface()) {
return die('Command Line only');
}
if(!AVideoPlugin::isEnabledByName('VideoHLS')){
return die('VideoHLS disabled');
}
ob_end_flush();
$global['limitForUnlimitedVideos'] = -1;
$videos = video::getAllVideosLight("", false, true);
$count = 0;
$total = count();
foreach ($videos as $value) {
$count++;
if(!Video::isValidDuration($value['duration'])){
$v = new Video('', '', $value['id'], true);
if(VideoHLS::updateHLSDurationIfNeed($v)){
echo "[{$count}/{$total}] Success updated [{$value['id']}] ".$v->getDuration().PHP_EOL;
}else{
echo "[{$count}/{$total}] ERROR updated [{$value['id']}] ".$v->getDuration().PHP_EOL;
}
}
}