From ae6a78fdbe5012c44b3924944bdb6edcea1de6b4 Mon Sep 17 00:00:00 2001 From: XShine555 Date: Tue, 21 Jul 2026 18:25:05 +0200 Subject: [PATCH] refactor(web-player): drop the quick mixes shelf The server-generated mixes cover the same ground and pick better songs, so the two shuffle-what-is-on-screen cards are redundant. --- web-player/src/routes/+page.svelte | 88 +----------------------------- 1 file changed, 1 insertion(+), 87 deletions(-) diff --git a/web-player/src/routes/+page.svelte b/web-player/src/routes/+page.svelte index 76cecca..71c9b08 100644 --- a/web-player/src/routes/+page.svelte +++ b/web-player/src/routes/+page.svelte @@ -14,7 +14,6 @@ } from '$lib/tracks'; import { hueFor } from '$lib/theme/color'; import Cover from '$lib/components/ui/Cover.svelte'; - import PlaylistArt from '$lib/components/ui/PlaylistArt.svelte'; import PlaylistCard from '$lib/components/ui/PlaylistCard.svelte'; import MixCard from '$lib/components/ui/MixCard.svelte'; import AlbumCard from '$lib/components/ui/AlbumCard.svelte'; @@ -31,7 +30,7 @@ type ContextMenuState } from '$lib/components/TrackContextMenu.svelte'; import type { YouTubeSong } from '$lib/types'; - import { appendUnique, shuffle } from '$lib/collections'; + import { appendUnique } from '$lib/collections'; let { data } = $props(); @@ -116,51 +115,6 @@ player.playOrToggle(latest.map(queueItemForTarget), index); } - function playShuffledLocal() { - if (localLatest.length === 0) return; - player.playQueue(shuffle(localLatest).map(queueItemForTarget), 0); - } - - function playShuffledYoutube() { - if (youtubeFillerItems.length === 0) return; - const targets = youtubeFillerItems.map((song) => ({ kind: 'youtube' as const, song })); - player.playQueue(shuffle(targets).map(queueItemForTarget), 0); - } - - interface QuickMix { - key: string; - title: string; - subtitle: string; - coverIds?: (string | number)[]; - coverSongs?: YouTubeSong[]; - onClick: () => void; - } - - const quickMixes = $derived( - ( - [ - localLatest.length > 0 - ? { - key: 'local', - title: 'Mezcla Musify', - subtitle: `${localLatest.length} ${localLatest.length === 1 ? 'canción' : 'canciones'}`, - coverIds: localLatest.map((item) => targetId(item)), - onClick: playShuffledLocal - } - : null, - youtubeFillerItems.length > 0 - ? { - key: 'youtube', - title: 'Mezcla YouTube Music', - subtitle: `${youtubeFillerItems.length} ${youtubeFillerItems.length === 1 ? 'canción' : 'canciones'}`, - coverSongs: youtubeFillerItems.slice(0, 4), - onClick: playShuffledYoutube - } - : null - ] as (QuickMix | null)[] - ).filter((mix): mix is QuickMix => mix !== null) - ); - function openContextMenu(event: MouseEvent, target: TrackTarget) { contextMenu = contextMenuStateFor(event, target); } @@ -273,46 +227,6 @@ {/if} -{#if quickMixes.length > 0} -
- - - {#each quickMixes as mix, i (mix.key)} - - {/each} - -
-{/if} - {#if mixes.length > 0}