feat: add epg preload to app initialization

This commit is contained in:
Trevor Mears
2026-01-18 19:11:21 -08:00
parent 53c577a932
commit 475c50b743
+6
View File
@@ -150,6 +150,12 @@ class App {
// Initialize home page first (it's needed for channel list) // Initialize home page first (it's needed for channel list)
await this.pages.home.init(); await this.pages.home.init();
// Preload EPG data in background (non-blocking)
// This ensures EPG info is available on Live TV page without visiting Guide first
this.epgGuide.loadEpg().catch(err => {
console.warn('Background EPG load failed:', err.message);
});
// Navigate to the page from URL hash, or default to home // Navigate to the page from URL hash, or default to home
const hash = window.location.hash.slice(1); // Remove # const hash = window.location.hash.slice(1); // Remove #
const initialPage = hash && this.pages[hash] ? hash : 'home'; const initialPage = hash && this.pages[hash] ? hash : 'home';