Commit graph

3 commits

Author SHA1 Message Date
b5f83ef6c8 stream: compute now-playing duration/position off the HTTP thread
All checks were successful
continuous-integration/drone/push Build is passing
The /nowplaying handler called source.duration/source.elapsed on the live
crossfaded source. Since it is polled every second by the web player, those
cross-thread source queries contended with the crossfade's own clock during a
transition and wedged the streaming clock — a few seconds of audio then a
frozen buffer looping on air, only ever with a listener connected.

Capture duration and the track start time in a synchronous on_metadata
callback (which runs in the clock thread, where touching the source is safe)
and have /nowplaying read those refs instead — position is just the wall-clock
time since the track started. No handler touches the source outside its clock
anymore, so the 3 s crossfade is safe again.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 17:06:55 +08:00
d302cf1c88 stream: scrobble listened tracks to ListenBrainz
All checks were successful
continuous-integration/drone/push Build is passing
The web player decides when a track counts as listened (caught near its
start and heard to ~90%, capped at 4 min) and triggers POST /scrobble.
The token stays server-side (RADIEO_LISTENBRAINZ_TOKEN), submitting the
listen with the canonical MusicBrainz MBID when available. Each airing is
deduplicated so multiple tabs submit it once.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 17:51:41 +08:00
8054c98dd1 stream: split radio.liq into pipeline, web and ingest-proxy parts
Extract the HTTP surface out of radio.liq into two included files: web.liq
(static assets, PWA, local player API) and ingest_proxy.liq (relays to the
ingest daemon). radio.liq keeps only the streaming pipeline and ends with the
%include directives, evaluated after the pipeline so the handlers see radio,
now_playing, history, etc.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 16:11:56 +08:00