mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-15 05:36:17 -08:00
feat(epg): rework live EPG panel into a horizontal timeline
Replace the vertical EPG list/panel with a single horizontal timeline ribbon (`app-epg-timeline`) shared across all live surfaces — the M3U player, the unified live tab, and the Xtream and Stalker layouts. It preloads a multi-day window and supports scroll, zoom, day navigation, short-programme tiers and per-state empty/error views; the programme-details dialog is restyled to match and now shows the channel logo. Timeline / UI - Auto-focus the currently-airing programme on channel select — instant (`behavior: 'auto'`), centred, and deduped by programme-set identity so the 30s tick / zoom / re-emits never cause flaky re-jumps. - Wide-tier cards show a dimmed description preview under the title; title and preview clip on whole lines (`flex-shrink: 0` + `-webkit-line-clamp`), never mid-line. - Dynamic bar subtitle: the now-playing / archive programme title instead of a static "Timeline" label. - State-aware toolbar: hide Now + zoom when there is no ribbon, and the date stepper when the channel has no EPG on any day (hidden, not disabled). - Empty-state fills and centres within the panel area instead of a fixed min-height that overflowed the compact inline panel and hid the buttons. EPG current-programme lookup (electron-backend) - Timezone-aware "airing now" comparison via SQLite `datetime()` (was a lexical string compare that broke for offset vs UTC `Z` timestamps). - Unscoped fallback for resolved candidates whose programmes are tagged with an out-of-scope source (multi-source imports sharing XMLTV ids), so the sidebar matches the timeline. - Match channel candidates by the raw (case-sensitive) key as well as `LOWER()`, since SQLite `LOWER()`/`COLLATE NOCASE` fold only ASCII — fixes Cyrillic / Greek channel names showing "No program information available". - Overlap-based day membership (`hasProgramsForDateKey`) so a film spanning midnight keeps the ribbon on "today" while it airs. Refactor - Extract the duplicated channel-list EPG enrichment (progress + side-car map) into `channel-list-container/epg-enrichment.util.ts`, shared by the all-channels / groups / favorites / recent views; also fixes recent's and favorites' unguarded, NaN-prone progress maths. Tests: ui-epg 75, components 77, electron-backend 432; lint + web build green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
b1119189e2
commit
a048e56aca
60 files changed
+5523
-1191
No files matched your search
@@ -238,8 +238,7 @@ test('@stalker PWA hides EPG for ITV channel', async ({ page }) => {
|
||||
await expect(page.locator('app-web-player-view')).toBeVisible({
|
||||
timeout: 20_000,
|
||||
});
|
||||
await expect(page.locator('app-epg-list')).toHaveCount(0);
|
||||
await expect(page.locator('app-live-epg-panel')).toHaveCount(0);
|
||||
await expect(page.locator('app-epg-timeline')).toHaveCount(0);
|
||||
expect(epgInfoRequests).toHaveLength(0);
|
||||
expect(shortEpgRequests).toHaveLength(0);
|
||||
});
|
||||
@@ -292,7 +291,7 @@ test('@stalker radio — stations use the inline audio player without EPG', asyn
|
||||
await restoreButton.click();
|
||||
await expect(stations.first()).toBeVisible();
|
||||
|
||||
await expect(page.locator('app-epg-list')).toHaveCount(0);
|
||||
await expect(page.locator('app-epg-timeline')).toHaveCount(0);
|
||||
expect(epgRequests).toHaveLength(0);
|
||||
});
|
||||
|
||||
@@ -325,11 +324,11 @@ test('@stalker PWA skips bulk EPG across channel switches', async ({
|
||||
|
||||
await channels.first().click();
|
||||
await expect(channels.first()).toHaveClass(/active/, { timeout: 20_000 });
|
||||
await expect(page.locator('app-epg-list')).toHaveCount(0);
|
||||
await expect(page.locator('app-epg-timeline')).toHaveCount(0);
|
||||
|
||||
await channels.nth(1).click();
|
||||
await expect(channels.nth(1)).toHaveClass(/active/, { timeout: 20_000 });
|
||||
await expect(page.locator('app-epg-list')).toHaveCount(0);
|
||||
await expect(page.locator('app-epg-timeline')).toHaveCount(0);
|
||||
expect(epgInfoRequests).toHaveLength(0);
|
||||
expect(shortEpgRequests).toHaveLength(0);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user