Fixed 2 errors causing exceptions

This commit is contained in:
Divarion-D
2025-12-01 21:11:12 +03:00
parent 98c4dc987f
commit 25cd54b7e7
3 changed files with 11 additions and 16 deletions
+1 -2
View File
@@ -378,8 +378,7 @@ if ($rStream['type'] == 1) {
echo "\t\t\t\t\t\t\t" . '</div>' . "\r\n\t\t\t\t\t\t" . '</div>' . "\r\n" . ' ';
}
if (!(0 < $rStream['tv_archive_server_id'] && 0 < $rStream['tv_archive_duration'])) {
} else {
if (0 < $rStream['tv_archive_server_id'] && 0 < $rStream['tv_archive_duration']) {
$rArchive = getArchive($rStream['id']);
echo ' <div class="tab-pane" id="archive">' . "\r\n\t\t\t\t\t\t\t" . '<div class="table">' . "\r\n\t\t\t\t\t\t\t\t" . '<table id="datatable-archive" class="table table-striped table-borderless mb-0">' . "\r\n\t\t\t\t\t\t\t\t\t" . '<thead>' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '<tr>' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '<th class="text-center">Date</th>' . "\r\n\t\t\t\t\t\t\t\t\t\t\t" . '<th>Title</th>' . "\r\n" . ' <th class="text-center">Status</th>' . "\r\n" . ' <th class="text-center">Player</th>' . "\r\n\t\t\t\t\t\t\t\t\t\t" . '</tr>' . "\r\n\t\t\t\t\t\t\t\t\t" . '</thead>' . "\r\n\t\t\t\t\t\t\t\t\t" . '<tbody>' . "\r\n" . ' ';
+7 -8
View File
@@ -1048,17 +1048,16 @@ if ($rType == "lines") {
if (1 < count($rCategoryIDs)) {
$rCategory .= " (+" . (count($rCategoryIDs) - 1) . " others)";
}
if (0 < $rRow["tv_archive_duration"] && 0 < $rRow["tv_archive_server_id"]) {
" &nbsp;<a href='archive?id=" . $rRow["id"] . "'><i class='text-danger mdi mdi-record'></i></a>";
$rRow >>= "stream_display_name";
if (0 < $rRow['tv_archive_duration'] && 0 < $rRow['tv_archive_server_id']) {
$rRow['stream_display_name'] .= " &nbsp;<a href='archive?id=" . $rRow['id'] . "'><i class='text-danger mdi mdi-record'></i></a>";
}
$adaptiveLinks = json_decode($rRow["adaptive_link"], true);
$adaptiveLinks = json_decode($rRow['adaptive_link'], true);
if (is_array($adaptiveLinks) && count($adaptiveLinks) > 0) {
" &nbsp;<a href='stream_view?id=" . $rRow["id"] . "'><i class='text-info mdi mdi-wifi-strength-3'></i></a>";
$rRow >>= "stream_display_name";
$rRow['stream_display_name'] .= " &nbsp;<a href='stream_view?id=" . $rRow['id'] . "'><i class='text-info mdi mdi-wifi-strength-3'></i></a>";
}
if ($rRow["title_sync"]) {
$rRow >>= "stream_display_name";
if ($rRow['title_sync']) {
$rRow['stream_display_name'] .= " &nbsp;<i class='text-info mdi mdi-sync tooltip' title='Title Sync'></i>";
}
$rStreamName = "<a href='stream_view?id=" . $rRow["id"] . "'><strong>" . $rRow["stream_display_name"] . "</strong><br><span style='font-size:11px;'>" . $rCategory . "</span></a>";
if ($rRow["server_name"]) {
+3 -6
View File
@@ -415,8 +415,7 @@ function getArchive($rStreamID) {
$rEPG = getchannelepg($rStreamID, true);
$rFiles = getArchiveFiles($rStream['tv_archive_server_id'], $rStreamID);
if (!(0 < count($rFiles) && 0 < count($rEPG))) {
} else {
if (!empty($rFiles) && !empty($rEPG)) {
foreach ($rFiles as $rFile) {
$rFilename = pathinfo($rFile)['filename'];
$rTimestamp = strtotime(explode(':', $rFilename)[0] . 'T' . implode(':', explode('-', explode(':', $rFilename)[1])) . ':00Z ' . str_replace(':', '', gmdate('P')));
@@ -433,10 +432,8 @@ function getArchive($rStreamID) {
}
}
if (!$rEPGID) {
} else {
if (isset($rReturn[$rEPGID])) {
} else {
if ($rEPGID) {
if (!isset($rReturn[$rEPGID])) {
$rReturn[$rEPGID] = $rEPG[$rEPGID];
$rReturn[$rEPGID]['archive_stop'] = null;
$rReturn[$rEPGID]['archive_start'] = $rReturn[$rEPGID]['archive_stop'];