feat: add epg preload to app initialization
This commit is contained in:
@@ -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';
|
||||||
|
|||||||
Reference in New Issue
Block a user