fix: mirror a live service timeline after the UI is recreated
CI / build (push) Successful in 3m59s
CI / play (push) Successful in 3m27s

The media service can keep playing after the task is swiped. A new UI now
adopts its queue, index and position instead of showing a stale paused state.
Notification artwork also uses cached offline covers. Version 0.4.1.
This commit is contained in:
TapTap committed 2026-11-19 16:58:20 +00:00
1 parent 8cf77f156d
commit 8e737fae2e
6 files changed
+37 -4

No files matched your search

@@ -184,7 +184,10 @@ class MediaControllerAudioPlayer(context: Context) : AudioPlayer {
Bundle().apply { putDouble(GAIN_DB_KEY, track.gainDb ?: 0.0) },
)
.apply {
if (!track.artworkUri.isNullOrBlank()) {
val bytes = track.artworkBytes
if (bytes != null && bytes.isNotEmpty()) {
setArtworkData(bytes, MediaMetadata.PICTURE_TYPE_FRONT_COVER)
} else if (!track.artworkUri.isNullOrBlank()) {
setArtworkUri(Uri.parse(track.artworkUri))
}
}