mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-19 09:34:38 +00:00
- 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. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| buffer.py | ||
| http_streamer.py | ||
| manager.py | ||