The player gains a queue sheet showing the current track and every upcoming track, with move up/down and remove; changes are persisted in the playback snapshot. Music and longform are now separate: library sync splits songs by the user's folder assignments, so longform no longer leaks into search, Shuffle all or moods. The new Longform tab groups audiobooks and podcasts by artist, offers a generated read-only playlist per artist, "Shuffle artist" for random tracks, separate longform search, and a Continue listening list with progress bars and resume. Positions are saved locally and to the server while playing, on pause and on track changes. Recommendation cards now show download progress (queued, downloading, failed with error and retry) and the mood refreshes while downloads are running.
This commit is contained in:
1 parent
dc719f3e1a
commit
c0ff586686
10 files changed
+796
-31
No files matched your search
@@ -24,8 +24,10 @@ The shared module contains the API client, session/cache storage, radio queue, a
|
||||
- Two add-to-mood actions in the player:
|
||||
- **Add to current mood** (the mood of the active radio session)
|
||||
- **Choose another mood** (picker)
|
||||
- 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 and new picks. Accepting a track the library already has adds it as a seed immediately.
|
||||
- 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.
|
||||
- **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.
|
||||
- The play queue and current track are saved locally, so a restart reopens the player paused and resumes on the next tap.
|
||||
@@ -95,11 +97,12 @@ Android cleartext HTTP is enabled for local development. Use HTTPS in production
|
||||
`AppStore` is a plain Kotlin class with a `StateFlow<AppState>`; Compose observes it. It owns:
|
||||
|
||||
- **Auth** — restore token, refresh token, logout.
|
||||
- **Library sync** — first launch pages through `/library/songs`; later launches use the `since` delta and tombstones.
|
||||
- **Library sync** — first launch pages through `/library/songs`; later launches use the `since` delta and tombstones. Songs are split into music and longform using the folders assigned at login, so the two never mix client-side.
|
||||
- **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.
|
||||
- **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.
|
||||
|
||||
On startup the app is usable before the network call completes: cached moods and library render immediately, then refresh in the background.
|
||||
@@ -137,8 +140,8 @@ The image build performs one warm-up compile (`kotlinNodeJsSetup`, `kotlinYarnSe
|
||||
## Known limitations
|
||||
|
||||
- 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. MP3s are decoded to 16-bit PCM before the line is opened, because Java Sound has no line for the compressed format.
|
||||
- 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 that are not in the library wait for the server-side downloader before they can be played.
|
||||
- Accepted recommendations are downloaded by the server into `<music>/AudioManager Imports`, scanned and added as seeds. The server needs outbound network access for this.
|
||||
- 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