new version

This commit is contained in:
UrloMythus
2026-04-15 19:23:14 +02:00
parent 5120b19d0b
commit 8134936d59
135 changed files with 3013 additions and 1589 deletions
+15 -3
View File
@@ -64,14 +64,21 @@ class Settings(BaseSettings):
dash_prebuffer_emergency_threshold: int = 90 # Emergency threshold percentage to trigger aggressive cache cleanup.
dash_prebuffer_inactivity_timeout: int = 60 # Seconds of inactivity before cleaning up stream state.
dash_segment_cache_ttl: int = 60 # TTL (seconds) for cached media segments; longer = better for slow playback.
dash_player_lock_timeout: float = 2.5 # Max wait (seconds) for player requests when a segment lock is busy.
dash_prebuffer_lock_timeout: float = 0.25 # Max wait (seconds) for background prebuffer lock acquisition.
dash_prefetch_max_concurrent: int = 1 # Max concurrent live DASH prefetch downloads to reduce lock contention.
dash_live_initial_media_prebuffer: bool = (
False # Whether manifest-time prebuffer should fetch live media segments (init segments are still prewarmed).
)
mpd_live_init_cache_ttl: int = 60 # TTL (seconds) for live init segment cache; 0 disables caching.
mpd_live_playlist_depth: int = 8 # Number of recent segments to expose per live playlist variant.
remux_to_ts: bool = False # Remux fMP4 segments to MPEG-TS for ExoPlayer/VLC compatibility.
processed_segment_cache_ttl: int = 60 # TTL (seconds) for caching processed (decrypted/remuxed) segments.
# FlareSolverr settings (for Cloudflare bypass)
flaresolverr_url: str | None = None # FlareSolverr service URL. Example: http://localhost:8191
flaresolverr_timeout: int = 60 # Timeout (seconds) for FlareSolverr requests.
# Byparr settings — Firefox/Camoufox-based solver for Cloudflare bypass and chevy IP whitelist.
# https://github.com/ThePhaseless/Byparr (drop-in FlareSolverr-compatible API)
byparr_url: str | None = None # Byparr service URL. Example: http://localhost:8192
byparr_timeout: int = 60 # Timeout (seconds) for Byparr requests.
# Acestream settings
enable_acestream: bool = False # Whether to enable Acestream proxy support.
@@ -89,6 +96,8 @@ class Settings(BaseSettings):
telegram_session_string: SecretStr | None = None # Persistent session string (avoids re-authentication).
telegram_max_connections: int = 8 # Max parallel DC connections for downloads (max 20, careful of floods).
telegram_request_timeout: int = 30 # Request timeout in seconds.
telegram_document_scan_limit: int = 500 # Max recent messages to scan when resolving chat_id+document_id.
telegram_document_cache_ttl: int = 3600 # TTL (seconds) for cached document_id->message_id mappings.
# Transcode settings
enable_transcode: bool = True # Whether to enable on-the-fly transcoding endpoints (MKV→fMP4, HLS VOD).
@@ -105,6 +114,9 @@ class Settings(BaseSettings):
upstream_retry_delay: float = 1.0 # Delay (seconds) between retry attempts.
graceful_stream_end: bool = True # Return valid empty playlist instead of error when upstream fails.
# EPG proxy settings
epg_cache_ttl: int = 3600 # TTL (seconds) for cached EPG/XMLTV data. Default 1 hour.
# Redis settings
redis_url: str | None = None # Redis URL for distributed locking and caching. None = disabled.
cache_namespace: str | None = (