Add a persistent server-side library where users can save tracks for instant local playback, bypassing external streaming sources.
Probably related to #11 and #7
Problem
Currently, every play request fetches audio from external sources (Tidal, Deezer, Dab). This means:
- Repeated plays of the same track waste bandwidth
- Playback depends on external service availability
- No way to build a permanent collection on the server
Solution
Introduce a Server Library - a permanent storage area separate from the TTL-based cache:
| Storage |
Purpose |
Lifetime |
| Cache |
Temporary streaming buffer |
24h TTL, 500MB limit |
| Library |
User's saved collection |
Permanent, no auto-cleanup |
Features
- Save to Server: New button in download modal saves tracks to server library
- Local Playback: Streaming endpoint checks library first, serves local files instantly
- Library View: Browse and manage saved tracks via header button
- Visual Indicator: "LOCAL" + "FLAC" badges show when playing from library
- Artist/Song Structure: Files organized as
/library/tracks/Artist/Song.flac
- Docker Volume: Library persists across container restarts
Playback Flow
Play request → Check Library → Check Cache → Fetch External
↓
Found locally?
↓
Yes: Serve with X-Source: library
Add a persistent server-side library where users can save tracks for instant local playback, bypassing external streaming sources.
Probably related to #11 and #7
Problem
Currently, every play request fetches audio from external sources (Tidal, Deezer, Dab). This means:
Solution
Introduce a Server Library - a permanent storage area separate from the TTL-based cache:
Features
/library/tracks/Artist/Song.flacPlayback Flow