Library screen: an "All music" card with Shuffle all, which builds a local queue from every cached song so playback does not need a mood session. Player bar: a sleep timer with 15/30/45/60/90 minute presets. The shared store shows the countdown and pauses playback; on Android the pause is also scheduled inside the media service through a custom session command, so it still fires when the app is backgrounded or the task is swiped away. Playback errors from the platform player now surface in the UI instead of failing silently (for example when no audio device is available). Tests cover shuffle-all, the empty library, timer expiry and cancelling it.
This commit is contained in:
1 parent
f8953fb200
commit
c7c1d59b70
10 files changed
+478
-42
No files matched your search
@@ -9,7 +9,7 @@ The client and server are designed together. There is no OpenSubsonic compatibil
|
||||
| Target | UI | Playback | Offline downloads |
|
||||
| --- | --- | --- | --- |
|
||||
| **Android** | Compose Multiplatform | Media3 / ExoPlayer | Yes |
|
||||
| **Desktop (JVM)** | Compose Multiplatform | MP3SPI + `SourceDataLine` | Yes |
|
||||
| **Desktop (JVM)** | Compose Multiplatform | MP3SPI, decoded to PCM + `SourceDataLine` | Yes |
|
||||
| **Web (Wasm)** | Compose Multiplatform | HTML5 `Audio` | Browser-managed cache only |
|
||||
|
||||
The shared module contains the API client, session/cache storage, radio queue, app state and all screens. Platform code is limited to HTTP engines, storage, audio and back handling.
|
||||
@@ -24,7 +24,8 @@ 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)
|
||||
- Library search and playback.
|
||||
- Library search and playback, plus **Shuffle all** to queue the whole library without starting a mood.
|
||||
- **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.
|
||||
- Original MP3 downloads with progress state, removal and storage usage.
|
||||
- Session persistence: the login survives app restarts until the token is revoked or expires.
|
||||
@@ -43,7 +44,8 @@ composeApp/
|
||||
|-- src/androidMain/ # Activity, Media3 player, filesystem storage
|
||||
|-- src/desktopMain/ # Main window, MP3SPI player, filesystem storage
|
||||
|-- src/wasmJsMain/ # Compose viewport, HTML audio, localStorage
|
||||
|-- src/commonTest/ # API parsing and cache tests
|
||||
|-- src/commonTest/ # API, cache and store tests
|
||||
|-- src/desktopTest/ # MP3 decoding and PCM conversion tests
|
||||
`-- ci/ # Android SDK CI image
|
||||
```
|
||||
|
||||
@@ -113,7 +115,7 @@ Adding a song makes it a permanent seed, so it is always eligible in future radi
|
||||
|
||||
## CI and releases
|
||||
|
||||
`.gitea/workflows/ci.yaml` runs on Gitea Actions using `gitea.tap-tap.win/taptap/audiomanager-client-ci:2`. The image has the Android SDK installed and a warmed Gradle dependency cache, so jobs do not download either on every run.
|
||||
`.gitea/workflows/ci.yaml` runs on Gitea Actions using `gitea.tap-tap.win/taptap/audiomanager-client-ci:3`. The image has the Android SDK, Node, Yarn and a warmed Gradle dependency cache, so jobs do not download them on every run.
|
||||
|
||||
- **main / PR:** run `desktopTest`, build the Android APK and the *development* Wasm bundle. The optimized Wasm build is CPU-bound and reserved for releases.
|
||||
- **`v*` tag:** additionally build the desktop fat jar and the optimized Wasm bundle, then attach all three to the Gitea release.
|
||||
@@ -124,12 +126,12 @@ Rebuild the CI image after changing `ci/Dockerfile` or dependency versions:
|
||||
scripts/build-ci-image.sh 3
|
||||
```
|
||||
|
||||
The image build performs one warm-up compile (`desktopTest`, `assembleDebug`, `compileKotlinWasmJs`) and then removes the sources, keeping only `/root/.gradle`.
|
||||
The image build performs one warm-up compile (`kotlinNodeJsSetup`, `kotlinYarnSetup`, `desktopTest`, `assembleDebug`, `compileKotlinWasmJs`) and then removes the sources, keeping only `/root/.gradle`.
|
||||
|
||||
## 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.
|
||||
- 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.
|
||||
- Web downloads are disabled because the browser owns its storage; the app still streams and caches metadata.
|
||||
- YT Music recommendations are displayed when the server provides them; discovery and downloading are server-side roadmap items.
|
||||
- No iOS target yet. The shared module is ready for one.
|
||||
Reference in new issue
Block a user