unarr/internal
Deivid Soto 7562b62241 feat(stream): refresh expired debrid links mid-stream (hueco #2/2c)
Debrid direct links are time-limited; a long playback can outlive the link
the session was created with. When a debrid source dies mid-stream the daemon
now re-resolves a fresh link for the same content and resumes — no torrent
fallback, no playback restart.

- debridFileProvider holds the URL behind a mutex; on an expired-link status
  (401/403/404/410) the ranged reader re-resolves via a refresh callback and
  retries (bounded: 1 initial + 1 post-refresh attempt). A browser opens
  several range connections, so the refresh is coalesced singleflight-style —
  N readers hitting the dead link share ONE re-resolution, not N.
- HLS-from-URL: the auto-restart supervisor re-resolves the link before
  relaunching ffmpeg (else it just retries the dead URL and burns the retry
  budget). The mutable URL lives in s.liveURL under s.mu — restartFromSegment
  reads it from the HTTP handler goroutine too (seek-restart), so cfg stays
  immutable and the write races nothing.
- agentClient.RefreshStreamURL → POST /api/internal/agent/stream-url.

Cross-source torrent<->debrid swap (the rare "debrid genuinely gone" case) is
intentionally deferred. Reader refresh + coalescing covered by unit tests
(incl. -race); the web endpoint re-resolves against a real AllDebrid account.
2026-05-31 17:02:59 +02:00
..
agent feat(stream): refresh expired debrid links mid-stream (hueco #2/2c) 2026-05-31 17:02:59 +02:00
arr feat(cli): upgrade command, rich status, and version cache 2026-03-31 22:05:43 +02:00
cmd feat(stream): refresh expired debrid links mid-stream (hueco #2/2c) 2026-05-31 17:02:59 +02:00
config feat(stream): authenticate /stream and /hls with signed tokens 2026-05-31 01:19:14 +02:00
engine feat(stream): refresh expired debrid links mid-stream (hueco #2/2c) 2026-05-31 17:02:59 +02:00
funnel fix(docker): three streaming/reliability bugs found in live docker test 2026-05-30 08:59:33 +02:00
library feat(stream): transcode debrid sources to HLS from a URL (hueco #2/2b) 2026-05-31 16:22:14 +02:00
mediaserver feat(cli): upgrade command, rich status, and version cache 2026-03-31 22:05:43 +02:00
parser feat: initial commit — unarr CLI 2026-03-28 11:29:42 +01:00
sentry refactor(sentry): decouple agent import via string-match, rename predicate 2026-05-27 17:03:26 +02:00
ui fix(ci): fix lint errors and pin CI to Go 1.25 2026-03-31 22:15:12 +02:00
upgrade fix(upgrade): fetch releases from TorrentClaw app, not GitHub 2026-05-21 14:46:10 +02:00
usenet fix(security): harden HLS session IDs, /health disclosure, archive password handling 2026-05-15 17:10:42 +02:00
vpn feat(vpn): unarr vpn command + report/arbitrate the WireGuard slot 2026-05-22 08:33:02 +02:00