diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-10-29 08:58:11 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-10-29 08:58:11 +0000 |
| commit | 7f61aa9fe4b1b0f2f46138bc09c0c88aa67b4b5d (patch) | |
| tree | 052d2fd0f6153f0aa5de5e1807c05c5cae84c7fa /server/internal | |
| parent | 2cadbbf5ab12d3963418a9c77105d45e95542ee1 (diff) | |
An episode started from the car resumes where it was left
Reported as "the play button, everywhere, should resume from the listened
position, not start over".
Every in-app surface was already correct, checked on a device before anything
was changed: the library row resumed a seeded 5:00 and played on from 5:07, the
episode screen showed "7m in" and labelled its button Resume, and both go
through PlaybackAdvancer, which is where this app decides where an episode
starts. So the bug was not in the resume rule.
Android Auto does not go through any of that. A Bluetooth button, the system's
resumption and the car all reach playback through the session callback, and that
path had only onAddMediaItems -- which turns a browse id into something playable
and says nothing about where in it to start. The player therefore began at zero.
It survived because it is wrong only where nobody developing the app presses
play.
onSetMediaItems now supplies the position, from PlaybackAdvancer, so the car and
the phone cannot drift apart on where an episode starts.
**The position is looked up from the items as they arrived, not the resolved
ones.** Resolution replaces a browse id with a playable item carrying the audio
URI, and the browse id does not survive it -- which is the whole reason
onGetItem exists. The first version read the resolved item, got null, and
resumed at zero: the same bug wearing a different hat. Found by logging it
rather than by reasoning about it, after the test kept failing with the fix in
place.
Pinned by MediaBrowseTest over the real session protocol, because the entire
defect lives in a boundary a direct call would skip. Watched failing with only
the production change stashed: expected 420000, was 0.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018AwnALZL6bD4VBtATDVv3B
Diffstat (limited to 'server/internal')
0 files changed, 0 insertions, 0 deletions
