1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
Oinktube/install/verifyCorruptedVideos.php
Daniel Neto 7aba074282 Update
2024-08-30 15:44:47 -03:00

24 lines
660 B
PHP

<?php
// streamer config
require_once '../videos/configuration.php';
ob_end_flush();
if (!isCommandLineInterface()) {
return die('Command Line only');
}
error_reporting(E_ALL);
ini_set('display_errors', 1);
$videos = Video::getAllVideosLight('', false, true);
foreach ($videos as $value) {
// Check if the video file is corrupted
$result = Video::isVideoFileCorrupted($value['id']);
if (!$result['isValid']) {
echo "ERROR Video ID={$value['id']} Title={$value['title']} - reason: {$result['msg']}" . PHP_EOL;
}else{
echo "SUCCESS Video ID={$value['id']} Title={$value['title']}" . PHP_EOL;
}
}
echo "Bye\n";
die();