From 3b1f6b59d40d23eecaa1e8e0d855cac67b601b60 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Mon, 9 Feb 2026 02:30:55 -0600 Subject: [PATCH] fix(i18n): remove t-shadow callbacks in core views cx --- src/lib/components/PlaylistModal.svelte | 4 +-- .../components/views/AlbumDetailView.svelte | 2 +- src/lib/components/views/HomeView.svelte | 28 +++++++++---------- src/lib/components/views/SearchView.svelte | 26 ++++++++--------- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/lib/components/PlaylistModal.svelte b/src/lib/components/PlaylistModal.svelte index 3f1df6565..7f186c79a 100644 --- a/src/lib/components/PlaylistModal.svelte +++ b/src/lib/components/PlaylistModal.svelte @@ -356,7 +356,7 @@ const tracks = await invoke>('library_get_tracks_by_ids', { trackIds }); - localTrackPaths = tracks.map(t => t.file_path); + localTrackPaths = tracks.map(track => track.file_path); } await invoke('add_tracks_to_pending_playlist', { @@ -419,7 +419,7 @@ const tracks = await invoke>('library_get_tracks_by_ids', { trackIds }); - localTrackPaths = tracks.map(t => t.file_path); + localTrackPaths = tracks.map(track => track.file_path); } // Create pending playlist for sync when back online diff --git a/src/lib/components/views/AlbumDetailView.svelte b/src/lib/components/views/AlbumDetailView.svelte index cdc1bf7d4..1afad034d 100644 --- a/src/lib/components/views/AlbumDetailView.svelte +++ b/src/lib/components/views/AlbumDetailView.svelte @@ -218,7 +218,7 @@ } const albumFullyDownloaded = $derived( - isAlbumFullyCached(album.tracks.map(t => t.id)) + isAlbumFullyCached(album.tracks.map(track => track.id)) ); const isVariousArtists = $derived( diff --git a/src/lib/components/views/HomeView.svelte b/src/lib/components/views/HomeView.svelte index 3e2ed5736..95daf501a 100644 --- a/src/lib/components/views/HomeView.svelte +++ b/src/lib/components/views/HomeView.svelte @@ -594,26 +594,26 @@ } function buildContinueQueueTracks(tracks: DisplayTrack[]) { - return tracks.map(t => ({ - id: t.id, - title: t.title, - artist: t.artist || 'Unknown Artist', - album: t.album || '', - duration_secs: t.durationSeconds, - artwork_url: t.albumArt || '', - hires: t.hires ?? false, - bit_depth: t.bitDepth ?? null, - sample_rate: t.samplingRate ?? null, - is_local: t.isLocal ?? false, - album_id: t.albumId || null, - artist_id: t.artistId ?? null, + return tracks.map(track => ({ + id: track.id, + title: track.title, + artist: track.artist || 'Unknown Artist', + album: track.album || '', + duration_secs: track.durationSeconds, + artwork_url: track.albumArt || '', + hires: track.hires ?? false, + bit_depth: track.bitDepth ?? null, + sample_rate: track.samplingRate ?? null, + is_local: track.isLocal ?? false, + album_id: track.albumId || null, + artist_id: track.artistId ?? null, })); } async function handleContinueTrackPlay(track: DisplayTrack, trackIndex: number) { // Create continue listening context if (continueTracks.length > 0) { - const trackIds = continueTracks.map(t => t.id); + const trackIds = continueTracks.map(track => track.id); await setPlaybackContext( 'home_list', diff --git a/src/lib/components/views/SearchView.svelte b/src/lib/components/views/SearchView.svelte index 036af5972..8c5a2eead 100644 --- a/src/lib/components/views/SearchView.svelte +++ b/src/lib/components/views/SearchView.svelte @@ -662,26 +662,26 @@ } function buildSearchQueueTracks(tracks: Track[]) { - return tracks.map(t => ({ - id: t.id, - title: t.title, - artist: t.performer?.name || 'Unknown Artist', - album: t.album?.title || '', - duration_secs: t.duration, - artwork_url: t.album?.image?.large || t.album?.image?.thumbnail || t.album?.image?.small || '', - hires: t.hires_streamable ?? false, - bit_depth: t.maximum_bit_depth ?? null, - sample_rate: t.maximum_sampling_rate ?? null, + return tracks.map(track => ({ + id: track.id, + title: track.title, + artist: track.performer?.name || 'Unknown Artist', + album: track.album?.title || '', + duration_secs: track.duration, + artwork_url: track.album?.image?.large || track.album?.image?.thumbnail || track.album?.image?.small || '', + hires: track.hires_streamable ?? false, + bit_depth: track.maximum_bit_depth ?? null, + sample_rate: track.maximum_sampling_rate ?? null, is_local: false, - album_id: t.album?.id || null, - artist_id: t.performer?.id ?? null, + album_id: track.album?.id || null, + artist_id: track.performer?.id ?? null, })); } async function handleSearchTrackPlay(track: Track, trackIndex: number) { // Create search results context if (trackResults && trackResults.items.length > 0) { - const trackIds = trackResults.items.map(t => t.id); + const trackIds = trackResults.items.map(track => track.id); await setPlaybackContext( 'home_list', // Using home_list for search results (search type doesn't exist yet)