diff --git a/src/lib/components/views/HomeView.svelte b/src/lib/components/views/HomeView.svelte index 6ec18b72f..d58adea43 100644 --- a/src/lib/components/views/HomeView.svelte +++ b/src/lib/components/views/HomeView.svelte @@ -87,6 +87,8 @@ let loadingNewReleases = $state(true); let loadingPressAwards = $state(true); let loadingMostStreamed = $state(true); + let loadingQobuzissimes = $state(true); + let loadingEditorPicks = $state(true); let loadingRecentAlbums = $state(true); let loadingContinueTracks = $state(true); let loadingTopArtists = $state(true); @@ -96,6 +98,8 @@ let newReleases = $state([]); let pressAwards = $state([]); let mostStreamed = $state([]); + let qobuzissimes = $state([]); + let editorPicks = $state([]); // User-specific content let recentAlbums = $state([]); @@ -109,6 +113,8 @@ newReleases.length > 0 || pressAwards.length > 0 || mostStreamed.length > 0 + || qobuzissimes.length > 0 + || editorPicks.length > 0 || recentAlbums.length > 0 || continueTracks.length > 0 || topArtists.length > 0 @@ -254,6 +260,8 @@ loadingNewReleases = true; loadingPressAwards = true; loadingMostStreamed = true; + loadingQobuzissimes = true; + loadingEditorPicks = true; loadingRecentAlbums = true; loadingContinueTracks = true; loadingTopArtists = true; @@ -291,6 +299,24 @@ loadingMostStreamed = false; } + if (isSectionVisible('qobuzissimes')) { + fetchFeaturedAlbums('qobuzissimes', LIMITS.featuredAlbums).then(albums => { + qobuzissimes = albums; + loadingQobuzissimes = false; + }); + } else { + loadingQobuzissimes = false; + } + + if (isSectionVisible('editorPicks')) { + fetchFeaturedAlbums('editor-picks', LIMITS.featuredAlbums).then(albums => { + editorPicks = albums; + loadingEditorPicks = false; + }); + } else { + loadingEditorPicks = false; + } + try { // ML-based scoring for personalized recommendations (falls back to simple queries if no scores) const seeds = await invoke('reco_get_home_ml', { @@ -440,6 +466,40 @@ {/if} + {#if sectionId === 'qobuzissimes' && qobuzissimes.length > 0} + + {#snippet children()} + {#each qobuzissimes as album} + onAlbumClick?.(album.id)} + /> + {/each} +
+ {/snippet} +
+ {/if} + + {#if sectionId === 'editorPicks' && editorPicks.length > 0} + + {#snippet children()} + {#each editorPicks as album} + onAlbumClick?.(album.id)} + /> + {/each} +
+ {/snippet} +
+ {/if} + {#if sectionId === 'recentAlbums' && recentAlbums.length > 0} {#snippet children()} diff --git a/src/lib/stores/homeSettingsStore.ts b/src/lib/stores/homeSettingsStore.ts index 26755e4e4..78fc3a171 100644 --- a/src/lib/stores/homeSettingsStore.ts +++ b/src/lib/stores/homeSettingsStore.ts @@ -10,6 +10,8 @@ export type HomeSectionId = | 'newReleases' | 'pressAwards' | 'mostStreamed' + | 'qobuzissimes' + | 'editorPicks' | 'recentAlbums' | 'continueTracks' | 'topArtists' @@ -37,6 +39,8 @@ const DEFAULT_SECTIONS: HomeSection[] = [ { id: 'newReleases', label: 'New Releases', visible: true, source: 'qobuz' }, { id: 'pressAwards', label: 'Press Awards', visible: true, source: 'qobuz' }, { id: 'mostStreamed', label: 'Popular Albums', visible: false, source: 'qobuz' }, + { id: 'qobuzissimes', label: 'Qobuzissimes', visible: false, source: 'qobuz' }, + { id: 'editorPicks', label: "Editor's Picks", visible: false, source: 'qobuz' }, { id: 'recentAlbums', label: 'Recently Played', visible: true, source: 'ml' }, { id: 'continueTracks', label: 'Continue Listening', visible: true, source: 'ml' }, { id: 'topArtists', label: 'Your Top Artists', visible: true, source: 'ml' },