1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00

Add error logging for EPG program processing to track channel mismatches and date issues

This commit is contained in:
Daniel Neto 2025-08-12 15:53:02 -03:00
parent c184ac591f
commit a887d9c34e

View file

@ -110,16 +110,19 @@ if ($forceRecreate || empty($channelsList)) {
$channels[$key]['epgData'] = array();
foreach ($epgData as $key2 => $program) {
if ($program['channel'] != $value['id']) {
_error_log("EPG program channel mismatch: {$program['channel']} != {$value['id']}");
continue;
}
// do not process the same start date
if(in_array($program['start'], $usedStartDate)){
_error_log("EPG program start date already processed: {$program['start']}");
continue;
}
$usedStartDate[] = $program['start'];
$timeWillStart = strtotime($program['start']);
if ($timeWillStart > $_MaxDaysFromNow) {
unset($epgData[$key2]);
_error_log("EPG program start time exceeds max limit: {$program['start']}");
continue;
}
$minutes = getDurationInMinutes(date('Y-m-d 00:00:00'), $program['stop']);