Feat: Added support for new tags in XMLTV

This commit is contained in:
Johnnybegood90
2026-03-14 13:36:12 +01:00
parent fc608ee0e0
commit 674c13ae26
6 changed files with 72 additions and 8 deletions
+9 -2
View File
@@ -49,6 +49,7 @@ function applySearch(q) {
if (p.stop < today || p.start > tomorrow) return false;
if (p.title.toLowerCase().includes(q)) return true;
if (p.desc && p.desc.toLowerCase().includes(q)) return true;
if ((p.categories || []).some(cat => cat.toLowerCase().includes(q))) return true;
return false;
});
});
@@ -110,7 +111,10 @@ function renderFiltered(filteredChannels, q) {
block.className = 'program-block';
// Highlight programs that match the current search query.
const matchesProg = p.title.toLowerCase().includes(q) || (p.desc && p.desc.toLowerCase().includes(q));
const matchesProg =
p.title.toLowerCase().includes(q) ||
(p.desc && p.desc.toLowerCase().includes(q)) ||
(p.categories || []).some(cat => cat.toLowerCase().includes(q));
if (matchesProg) block.classList.add('search-match');
if (p.stop < now) block.classList.add('is-past');
@@ -168,7 +172,10 @@ function renderMobileFiltered(filteredChannels, q) {
const isLive = p.start <= now && p.stop > now;
const isPast = p.stop < now;
const dur = Math.round((p.stop - p.start) / 60000);
const matchesProg = p.title.toLowerCase().includes(q) || (p.desc && p.desc.toLowerCase().includes(q));
const matchesProg =
p.title.toLowerCase().includes(q) ||
(p.desc && p.desc.toLowerCase().includes(q)) ||
(p.categories || []).some(cat => cat.toLowerCase().includes(q));
const item = document.createElement('div');
item.className = 'mobile-program' + (isLive ? ' is-live' : '') + (isPast ? ' is-past' : '') + (matchesProg ? ' search-match' : '');