mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-18 17:16:26 +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. |
||
|---|---|---|
| .. | ||
| input | ||
| output | ||
| services | ||
| __init__.py | ||
| apps.py | ||
| channel_status.py | ||
| client_manager.py | ||
| config_helper.py | ||
| constants.py | ||
| redis_keys.py | ||
| server.py | ||
| url_utils.py | ||
| urls.py | ||
| utils.py | ||
| views.py | ||