Dispatcharr/apps
Cédric Marcoux 3b8717c4ce fix: timeshift stream management, channel resolution, and streaming throughput
- Channel resolution: resolve by Channel.id first (what the XC API emits
  to clients), fall back to provider stream_id for backward compatibility.
  Fixes 404 on all timeshift requests from XC clients.

- Stream management: timeshift is now a first-class citizen alongside live
  and VOD in the stream-limits system.  get_user_active_connections()
  detects type='timeshift', attempt_stream_termination() sets a Redis
  stop key (same pattern as VOD), and the timeshift view calls
  check_user_stream_limits() before connecting upstream.  The stream
  generator checks the stop key every 100 chunks.  Fixes infinite retry
  loops on max_connections=1 providers for live→timeshift and
  timeshift→timeshift transitions.

- Streaming: replaced HTTPStreamReader thread+pipe with direct
  iter_content+yield (same pattern as VOD proxy).  The pipe approach
  deadlocked under gevent because the reader thread's select() competed
  with the greenlet's pipe read for hub scheduling.  Throughput went
  from ~74 B/s to 13+ MB/s.

- TS preamble: peek now strips pre-sync bytes (PHP warnings, BOM) before
  prepending to the stream, preventing corrupt TS output.

- Credential safety: _redact_url() now truncates to scheme://host/...
  to avoid leaking XC path-based credentials in logs.

- Tests: updated 5 tests that referenced the removed HTTPStreamReader.
  21/21 timeshift tests pass.

- Migration: fixed SyntaxWarning for unescaped regex in 0038.
2026-05-27 23:32:57 +02:00
..
accounts Enhancement: Initial fmp4 support and major ts_proxy refactor 2026-05-08 17:46:47 -05:00
api initial connect feature 2026-02-08 09:29:22 -05:00
backups fix: ensure migrations run automatically after restoring backups to prevent missing schema issues 2026-05-23 21:25:44 -05:00
channels fix: timeshift stream management, channel resolution, and streaming throughput 2026-05-27 23:32:57 +02:00
connect fix: replace fork()-based subprocess with posix_spawn at all uWSGI spawn sites 2026-05-15 16:45:09 -05:00
dashboard modified database fields for consistency, removed custom_url from streams (no longer needed) 2025-03-16 09:07:10 -04:00
epg feat: Enhance series rule evaluation and management 2026-05-04 20:45:40 -05:00
hdhr feat: Add HDHR output profile support and reorganize settings 2026-05-10 11:14:02 -05:00
m3u feat: built-in XC catch-up (timeshift) support 2026-05-27 13:13:20 +02:00
output fix: timeshift stream management, channel resolution, and streaming throughput 2026-05-27 23:32:57 +02:00
plugins Enhancement: add caching for plugin detail responses and implement cache invalidation on repo refresh. 2026-05-21 16:12:31 -05:00
proxy fix: timeshift stream management, channel resolution, and streaming throughput 2026-05-27 23:32:57 +02:00
timeshift fix: timeshift stream management, channel resolution, and streaming throughput 2026-05-27 23:32:57 +02:00
vod fix: clear previous failure entries after successful logo fetch in LogoViewSet and VODLogoViewSet 2026-04-14 13:34:17 -05:00