fix(i18n): remove t-shadow callbacks in core views

cx
This commit is contained in:
vicrodh committed 2026-02-09 02:30:55 -06:00
1 parent fb3204f2e4
commit 3b1f6b59d4
4 files changed
+30 -30

No files matched your search

+2 -2
View File
@@ -356,7 +356,7 @@
const tracks = await invoke<Array<{ id: number; file_path: string }>>('library_get_tracks_by_ids', { const tracks = await invoke<Array<{ id: number; file_path: string }>>('library_get_tracks_by_ids', {
trackIds trackIds
}); });
localTrackPaths = tracks.map(t => t.file_path); localTrackPaths = tracks.map(track => track.file_path);
} }
await invoke('add_tracks_to_pending_playlist', { await invoke('add_tracks_to_pending_playlist', {
@@ -419,7 +419,7 @@
const tracks = await invoke<Array<{ id: number; file_path: string }>>('library_get_tracks_by_ids', { const tracks = await invoke<Array<{ id: number; file_path: string }>>('library_get_tracks_by_ids', {
trackIds trackIds
}); });
localTrackPaths = tracks.map(t => t.file_path); localTrackPaths = tracks.map(track => track.file_path);
} }
// Create pending playlist for sync when back online // Create pending playlist for sync when back online
@@ -218,7 +218,7 @@
} }
const albumFullyDownloaded = $derived( const albumFullyDownloaded = $derived(
isAlbumFullyCached(album.tracks.map(t => t.id)) isAlbumFullyCached(album.tracks.map(track => track.id))
); );
const isVariousArtists = $derived( const isVariousArtists = $derived(
+14 -14
View File
@@ -594,26 +594,26 @@
} }
function buildContinueQueueTracks(tracks: DisplayTrack[]) { function buildContinueQueueTracks(tracks: DisplayTrack[]) {
return tracks.map(t => ({ return tracks.map(track => ({
id: t.id, id: track.id,
title: t.title, title: track.title,
artist: t.artist || 'Unknown Artist', artist: track.artist || 'Unknown Artist',
album: t.album || '', album: track.album || '',
duration_secs: t.durationSeconds, duration_secs: track.durationSeconds,
artwork_url: t.albumArt || '', artwork_url: track.albumArt || '',
hires: t.hires ?? false, hires: track.hires ?? false,
bit_depth: t.bitDepth ?? null, bit_depth: track.bitDepth ?? null,
sample_rate: t.samplingRate ?? null, sample_rate: track.samplingRate ?? null,
is_local: t.isLocal ?? false, is_local: track.isLocal ?? false,
album_id: t.albumId || null, album_id: track.albumId || null,
artist_id: t.artistId ?? null, artist_id: track.artistId ?? null,
})); }));
} }
async function handleContinueTrackPlay(track: DisplayTrack, trackIndex: number) { async function handleContinueTrackPlay(track: DisplayTrack, trackIndex: number) {
// Create continue listening context // Create continue listening context
if (continueTracks.length > 0) { if (continueTracks.length > 0) {
const trackIds = continueTracks.map(t => t.id); const trackIds = continueTracks.map(track => track.id);
await setPlaybackContext( await setPlaybackContext(
'home_list', 'home_list',
+13 -13
View File
@@ -662,26 +662,26 @@
} }
function buildSearchQueueTracks(tracks: Track[]) { function buildSearchQueueTracks(tracks: Track[]) {
return tracks.map(t => ({ return tracks.map(track => ({
id: t.id, id: track.id,
title: t.title, title: track.title,
artist: t.performer?.name || 'Unknown Artist', artist: track.performer?.name || 'Unknown Artist',
album: t.album?.title || '', album: track.album?.title || '',
duration_secs: t.duration, duration_secs: track.duration,
artwork_url: t.album?.image?.large || t.album?.image?.thumbnail || t.album?.image?.small || '', artwork_url: track.album?.image?.large || track.album?.image?.thumbnail || track.album?.image?.small || '',
hires: t.hires_streamable ?? false, hires: track.hires_streamable ?? false,
bit_depth: t.maximum_bit_depth ?? null, bit_depth: track.maximum_bit_depth ?? null,
sample_rate: t.maximum_sampling_rate ?? null, sample_rate: track.maximum_sampling_rate ?? null,
is_local: false, is_local: false,
album_id: t.album?.id || null, album_id: track.album?.id || null,
artist_id: t.performer?.id ?? null, artist_id: track.performer?.id ?? null,
})); }));
} }
async function handleSearchTrackPlay(track: Track, trackIndex: number) { async function handleSearchTrackPlay(track: Track, trackIndex: number) {
// Create search results context // Create search results context
if (trackResults && trackResults.items.length > 0) { if (trackResults && trackResults.items.length > 0) {
const trackIds = trackResults.items.map(t => t.id); const trackIds = trackResults.items.map(track => track.id);
await setPlaybackContext( await setPlaybackContext(
'home_list', // Using home_list for search results (search type doesn't exist yet) 'home_list', // Using home_list for search results (search type doesn't exist yet)