unarr/internal/engine
Deivid Soto 40e7977cf5 fix(streaming): bounded ffmpeg auto-restart + tmpdir gc + probe/stderr safety
Reliability hardening pass for the HLS daemon. None of these change the
public API, all reduce the chances of an end-user seeing a broken
session in production.

- engine/hls.go waitFFmpeg now supervises ffmpeg: on a non-graceful
  exit while the session is still in use, restart from the last good
  segment up to 3 times within a 60 s window. Beyond that we give up
  and log the file as broken — better than a perpetually black player
  with no error.
- engine/hls.go CleanupHLSOrphanDirs() removes tmpdirs older than 1 h
  at startup; cmd/daemon.go calls it before streamSrv.Listen so a
  daemon crash + restart doesn't leak gigabytes of segment files.
- engine/hls.go StartHLSSession wraps ffprobe in a 15 s timeout. A
  hung probe on a slow remote fs would otherwise block the goroutine
  forever and the player would stay on "Preparando sesion".
- engine/hls.go hlsStderrCapture buffer is capped at 64 KiB; a
  misbehaving ffmpeg that emits megabytes without newlines used to
  grow daemon memory unbounded.
2026-05-08 08:51:19 +02:00
..
wire feat(stream): pion-based WebRTC byte streamer for browser playback 2026-05-06 23:12:38 +02:00
debrid.go feat(sync): replace WS+DO transport with unified HTTP sync 2026-04-08 18:50:59 +02:00
debrid_test.go chore: rename module from torrentclaw-cli to unarr 2026-03-30 13:06:07 +02:00
hls.go fix(streaming): bounded ffmpeg auto-restart + tmpdir gc + probe/stderr safety 2026-05-08 08:51:19 +02:00
hwaccel.go feat(stream): pion-based WebRTC byte streamer for browser playback 2026-05-06 23:12:38 +02:00
hwaccel_test.go feat(stream): pion-based WebRTC byte streamer for browser playback 2026-05-06 23:12:38 +02:00
manager.go feat(sync): replace WS+DO transport with unified HTTP sync 2026-04-08 18:50:59 +02:00
manager_integration_test.go test: add comprehensive test suite for engine, agent and cmd packages 2026-04-08 23:36:00 +02:00
manager_test.go fix(ci): fix lint errors and pin CI to Go 1.25 2026-03-31 22:15:12 +02:00
method.go feat: initial commit — unarr CLI 2026-03-28 11:29:42 +01:00
method_test.go feat(cli): upgrade command, rich status, and version cache 2026-03-31 22:05:43 +02:00
notify.go feat: improve daemon resilience, streaming, and usenet downloads 2026-03-28 21:36:12 +01:00
notify_test.go feat: improve daemon resilience, streaming, and usenet downloads 2026-03-28 21:36:12 +01:00
organize.go feat(organize): use server metadata for file organization and subtitle handling 2026-04-05 23:36:01 +02:00
organize_expand_test.go feat(organize): use server metadata for file organization and subtitle handling 2026-04-05 23:36:01 +02:00
organize_test.go feat: improve daemon resilience, streaming, and usenet downloads 2026-03-28 21:36:12 +01:00
probe.go feat(streaming): add HLS transport pipeline (daemon side) 2026-05-07 16:10:22 +02:00
probe_test.go feat(stream): pion-based WebRTC byte streamer for browser playback 2026-05-06 23:12:38 +02:00
progress.go feat(sync): replace WS+DO transport with unified HTTP sync 2026-04-08 18:50:59 +02:00
progress_test.go fix(ci): fix lint errors and pin CI to Go 1.25 2026-03-31 22:15:12 +02:00
resolve.go feat: initial commit — unarr CLI 2026-03-28 11:29:42 +01:00
resolve_test.go feat: initial commit — unarr CLI 2026-03-28 11:29:42 +01:00
safepath.go feat: initial commit — unarr CLI 2026-03-28 11:29:42 +01:00
safepath_test.go feat: initial commit — unarr CLI 2026-03-28 11:29:42 +01:00
seed_file.go feat(seed-file): unarr-side handler for browser-on-demand seeding (Fase 4.7.c) 2026-05-06 16:28:01 +02:00
seed_file_test.go feat(seed-file): unarr-side handler for browser-on-demand seeding (Fase 4.7.c) 2026-05-06 16:28:01 +02:00
sockopt_unix.go fix(stream): use platform-specific socket options for Windows cross-compilation 2026-04-07 19:18:13 +02:00
sockopt_windows.go fix(stream): use platform-specific socket options for Windows cross-compilation 2026-04-07 19:18:13 +02:00
stream.go fix(stream): fix black screen on remote/Tailscale streaming 2026-04-09 16:15:41 +02:00
stream_player.go feat: initial commit — unarr CLI 2026-03-28 11:29:42 +01:00
stream_server.go feat(streaming): seek-restart, single-session, idle sweeper, probe.json 2026-05-07 23:55:05 +02:00
stream_server_test.go fix(stream): fix black screen on remote/Tailscale streaming 2026-04-09 16:15:41 +02:00
stream_source.go fix(transcoder): force main profile + setparams Rec.709 + serveRange wait 2026-05-07 13:48:45 +02:00
stream_test.go fix(stream): fix black screen on remote/Tailscale streaming 2026-04-09 16:15:41 +02:00
task.go fix: resolve deadlock, data races and path traversal vulnerabilities 2026-04-08 23:36:18 +02:00
task_test.go fix(lint): use default:none to disable errcheck, fix all gofmt and exhaustive 2026-03-31 00:29:16 +02:00
torrent.go chore(torrent): bump anacrolix log level Critical → Warning for visibility 2026-05-06 21:17:11 +02:00
torrent_test.go test: add comprehensive test suite for engine, agent and cmd packages 2026-04-08 23:36:00 +02:00
transcoder.go fix(transcoder): force aac stereo 48khz + frag_duration for mse compat 2026-05-07 14:59:43 +02:00
transcoder_test.go feat(stream): pion-based WebRTC byte streamer for browser playback 2026-05-06 23:12:38 +02:00
upnp.go fix: resolve deadlock, data races and path traversal vulnerabilities 2026-04-08 23:36:18 +02:00
upnp_debug_test.go feat(stream): add NAT-PMP port mapping for remote downloads 2026-04-06 10:09:07 +02:00
upnp_live_test.go feat(stream): add NAT-PMP port mapping for remote downloads 2026-04-06 10:09:07 +02:00
upnp_test.go feat(stream): add NAT-PMP port mapping for remote downloads 2026-04-06 10:09:07 +02:00
usenet.go fix: resolve deadlock, data races and path traversal vulnerabilities 2026-04-08 23:36:18 +02:00
usenet_test.go test: add comprehensive test suite for engine, agent and cmd packages 2026-04-08 23:36:00 +02:00
verify.go feat: initial commit — unarr CLI 2026-03-28 11:29:42 +01:00
verify_test.go feat: initial commit — unarr CLI 2026-03-28 11:29:42 +01:00
watch_reporter.go feat(stream): report duration and position in watch progress 2026-04-07 23:29:00 +02:00
watch_reporter_test.go fix(daemon): cancel watch reporter on stream switch and re-notify ready 2026-04-07 23:30:53 +02:00
webrtc.go feat(torrent): act as WebTorrent peer for browser ↔ unarr P2P streaming 2026-05-06 08:59:58 +02:00
webrtc_stream.go fix(transcoder): force main profile + setparams Rec.709 + serveRange wait 2026-05-07 13:48:45 +02:00
webrtc_test.go feat(torrent): act as WebTorrent peer for browser ↔ unarr P2P streaming 2026-05-06 08:59:58 +02:00