- The stream reader records whether the decoder stopped on a read error
and whether the server announced the file size. An episode whose
connection was lost (stall, expired URL) or whose sizeless stream
closed early is no longer completed at its full duration: the last
position is saved, playback stops on the episode and the queue does
not move on (playback::played_to_the_end).
- Streams are cancelled by the player's source generation: a superseded
start stops connecting or reading up to its resume offset, and a read
blocked inside the audio callback returns within 100 ms instead of up
to 30 s. The player no longer reports the end of a superseded source.
- A pause or resume pressed while an episode connects is applied when
its source arrives (Controller::expect_source).
- Seeks report their result (PlayerEvent::Seeked); an episode's seek is
saved only when the audio moved, and seeks while connecting or in a
stream without Range support are refused with a message.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Episodes stream from the publisher through the prototype's bounded HTTP
Range reader (ported, URL queries redacted from errors). The audio URL and
resume position come from the store at play time; a 4xx on the audio URL
refreshes the feed once and retries with the address it now lists, and a
stream that cannot seek refuses to start at a saved position instead of
playing from the wrong place. Prepared sources reach the audio thread
with the player's source generation, so a slow stream never replaces a
newer start or stop, and with their start offset for position reporting.
Progress follows the FRID contract through one ordered writer thread:
start_session or restart on start, checkpoints every 20 s and on pause,
explicit seeks, complete_session near the end or at end of stream, and a
final save with the last seen position on stop, track change, handoff
and exit. A superseded session stops checkpointing until the next
explicit action; listening sessions are recorded at pause, completion
and end. Enter on an episode plays it after the current item, b starts
it over, a/A queue it, and mark played goes through the same writer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>