feat: Implement offline library synchronization with IndexedDB

- Added `useOfflineLibrarySync` hook for managing offline library sync operations.
- Created `OfflineLibrarySync` component for UI integration.
- Developed `offlineLibraryDB` for IndexedDB interactions, including storing and retrieving albums, artists, songs, and playlists.
- Implemented sync operations for starred items, playlists, and scrobbling.
- Added auto-sync functionality when coming back online.
- Included metadata management for sync settings and statistics.
- Enhanced error handling and user feedback through toasts.
This commit is contained in:
2025-08-08 20:04:06 +00:00
committed by GitHub
parent f6a6ee5d2e
commit ba84271d78
13 changed files with 2102 additions and 113 deletions

View File

@@ -46,6 +46,8 @@ export function useOfflineAudioPlayer() {
if (offlineStatus) {
track.isOffline = true;
track.offlineUrl = `offline-song-${song.id}`;
// Prefer offline cached URL to avoid re-streaming even when online
track.url = track.offlineUrl;
}
}