feat: unavailable track handling with icon in track number column
- Add isUnavailable prop to TrackRow to show AlertCircle instead of track number - Show unavailable icon only for user's own playlists (not Qobuz official playlists) - Gray out unavailable tracks in both owned and non-owned playlists - Remove all interactions for unavailable tracks in non-owned playlists - Keep only "remove from playlist" option for unavailable tracks in owned playlists - Create unavailableTracksStore for persisting unavailable track IDs to localStorage - Load unavailable tracks on app startup in bootstrap.ts - Auto-mark tracks as unavailable when playback fails with TrackUnavailable error
This commit is contained in:
1 parent
503e86eeb4
commit
d46a08465c
5 files changed
+162
-45
No files matched your search
@@ -11,6 +11,7 @@ import { goBack, goForward } from '$lib/stores/navigationStore';
|
||||
import { loadToastsPreference } from '$lib/stores/toastStore';
|
||||
import { loadSystemNotificationsPreference, flushScrobbleQueue } from '$lib/services/playbackService';
|
||||
import { initOfflineStore, cleanupOfflineStore, onOnlineTransition, syncPendingPlaylists } from '$lib/stores/offlineStore';
|
||||
import { loadUnavailableTracks } from '$lib/stores/unavailableTracksStore';
|
||||
import { getNextZoomLevel } from '$lib/utils/zoom';
|
||||
import { getZoom, setZoom } from '$lib/stores/zoomStore';
|
||||
|
||||
@@ -141,6 +142,9 @@ export function bootstrapApp(): BootstrapResult {
|
||||
// Initialize offline store (async, fire-and-forget)
|
||||
initOfflineStore();
|
||||
|
||||
// Load unavailable tracks from localStorage
|
||||
loadUnavailableTracks();
|
||||
|
||||
// Register callback to flush scrobble queue and sync playlists when transitioning to online
|
||||
onOnlineTransition(() => {
|
||||
console.log('[Bootstrap] Online transition detected - flushing scrobble queue and syncing playlists');
|
||||
|
||||
Reference in new issue
Block a user