feat: previous/scrub controls, mood mix and artwork for downloads
CI / build (push) Successful in 2m16s
CI / build (push) Successful in 2m16s
Playback: - Previous button: after two seconds it restarts the current track, otherwise it restores the last played track and puts the outgoing one back in front of the queue. History is persisted in the playback snapshot. - The progress slider is draggable on every platform. Desktop previously refused to seek; it now restarts the decoder at the requested position, asking the server for a timeOffset on remote streams and skipping PCM frames for local files. Artwork: - Client downloads store the 320px cover next to the MP3 and Android sets it as MediaMetadata artwork data, so the notification and offline playback keep the cover. Deleting a download removes the image too. Moods: - New mood setting and editor slider choose the seed share of each radio batch; the server generates the rest from recommendations. Library: - Delta refresh now seeds its song map from both cached music and cached longform. Longform used to disappear after the first delta, which is why the artist list and artist playlists were empty while search still worked.
This commit is contained in:
1 parent
c0ff586686
commit
17bda94bfc
18 files changed
+390
-27
No files matched your search
@@ -27,6 +27,9 @@ The shared module contains the API client, session/cache storage, radio queue, a
|
||||
- YT Music recommendations in the mood editor: refresh on demand, accept or reject candidates, thumbnails, and a clear state for library matches (`Seed added`), accepted-for-download tracks (`Queued`, `Downloading`, `Download failed` with retry) and new picks. Accepting a track the library already has adds it as a seed immediately; the rest are downloaded by the server and promoted automatically.
|
||||
- Library search and playback, plus **Shuffle all** to queue the whole library without starting a mood.
|
||||
- A queue sheet from the player: the current track plus every upcoming track, with move up/down and remove. Changes are persisted locally.
|
||||
- **Previous** from the player: after two seconds of playback it restarts the current track; before that it restores the last played track. The track it leaves is put back at the front of the queue.
|
||||
- **Scrubbing**: the progress slider can be dragged on every platform. Android/web seek natively; desktop restarts the decoder at the requested position (`timeOffset` for remote streams, PCM skip for local files).
|
||||
- **Seed mix** per mood: a slider chooses the share of seeds vs recommendations for each generated batch. The server rolls the percentage for every queued track and falls back to the other pool when one runs out.
|
||||
- **Longform tab** for audiobooks and podcasts: per-artist read-only playlists, “Shuffle artist” for random episodes, a resume list with progress, and a separate search scope. Long-form never enters music search, Shuffle all, moods or radio.
|
||||
- **Sleep timer** (15/30/45/60/90 minutes) that pauses playback. On Android the pause is scheduled inside the media service, so it still fires when the app is backgrounded or the task is swiped away.
|
||||
- Offline library cache: moods, songs and the last sync revision are stored locally. When the server is unreachable, downloaded tracks still play.
|
||||
@@ -101,7 +104,7 @@ Android cleartext HTTP is enabled for local development. Use HTTPS in production
|
||||
- **Mood cache** — mood details are stored so the app can open them offline.
|
||||
- **Radio** — one session per mood, batches of 12, prefetch when the queue is short, no repeats within a session.
|
||||
- **Downloads** — stored under the platform app directory, keyed by deterministic song ID.
|
||||
- **Playback snapshot** — the session, upcoming queue and current track are persisted on every queue change and restored on the next launch.
|
||||
- **Playback snapshot** — the session, upcoming queue, current track and play history are persisted on every queue change and restored on the next launch.
|
||||
- **Longform progress** — position is saved locally and to `/longform/progress` while playing, on pause and on track changes; the resume list is fed from the server when online.
|
||||
- **Offline retry** — a background loop retries the library sync until the server responds again.
|
||||
|
||||
@@ -142,6 +145,7 @@ The image build performs one warm-up compile (`kotlinNodeJsSetup`, `kotlinYarnSe
|
||||
- The media notification exposes play/pause and seeking. Queue actions (skip, add to mood) stay in the app because the mood session and its events belong to the server.
|
||||
- Desktop playback cannot seek (sequential decoder); pause/resume and skipping work. Longform resume therefore starts from the beginning on desktop. MP3s are decoded to 16-bit PCM before the line is opened, because Java Sound has no line for the compressed format.
|
||||
- Web downloads are disabled because the browser owns its storage; the app still streams and caches metadata.
|
||||
- Accepted recommendations are downloaded by the server into `<music>/AudioManager Imports`, scanned and added as seeds. The server needs outbound network access for this.
|
||||
- Accepted recommendations are downloaded by the server into `<music>/AudioManager Imports`, with the YT thumbnail embedded as cover art, scanned and added as seeds. The server needs outbound network access for this.
|
||||
- Offline downloads also store the 320 px cover next to the MP3 (`<songId>.jpg`), so the in-app cover and the Android notification artwork survive without the server. Deleting a download removes both files.
|
||||
- YT Music discovery runs server-side through `yt-dlp`; downloading accepted tracks that are not in the library is still roadmap.
|
||||
- No iOS target yet. The shared module is ready for one.
|
||||
Reference in new issue
Block a user