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
+7 -4
View File
@@ -8,8 +8,13 @@ function getNowPlaying(chId) {
// ── TOOLTIP ───────────────────────────────────────────────────────────────────
function showTooltip(e, p) {
const ep = fmtEpisode(p.season, p.episode);
document.getElementById('tt-title').textContent = p.title + (ep ? ' ' + ep : '');
document.getElementById('tt-time').textContent = `${fmtTime(p.start)} ${fmtTime(p.stop)} · ${Math.round((p.stop-p.start)/60000)} min`;
const genres = formatCategories(p.categories);
const title = p.title + (p.subtitle ? ` - ${p.subtitle}` : '') + (ep ? ' ' + ep : '');
const meta = [p.airDate, p.rating, genres].filter(Boolean).join(' · ');
document.getElementById('tt-title').textContent = title;
document.getElementById('tt-time').textContent =
`${fmtTime(p.start)}${fmtTime(p.stop)} · ${Math.round((p.stop-p.start)/60000)} min` +
(meta ? ` · ${meta}` : '');
document.getElementById('tt-desc').textContent = p.desc || '—';
document.getElementById('tooltip').classList.add('visible');
moveTooltip(e);
@@ -23,5 +28,3 @@ function moveTooltip(e) {
function hideTooltip() { document.getElementById('tooltip').classList.remove('visible'); }