Commit graph

20 commits

Author SHA1 Message Date
SergeantPanda
89a23164ff Enhancement: Add system event logging and viewer with M3U/EPG endpoint caching
System Event Logging:
- Add SystemEvent model with 15 event types tracking channel operations, client connections, M3U/EPG activities, and buffering events
- Log detailed metrics for M3U/EPG refresh operations (streams/programs created/updated/deleted)
- Track M3U/EPG downloads with client information (IP address, user agent, profile, channel count)
- Record channel lifecycle events (start, stop, reconnect) with stream and client details
- Monitor client connections/disconnections and buffering events with stream metadata

Event Viewer UI:
- Add SystemEvents component with real-time updates via WebSocket
- Implement pagination, filtering by event type, and configurable auto-refresh
- Display events with color-coded badges and type-specific icons
- Integrate event viewer into Stats page with modal display
- Add event management settings (retention period, refresh rate)

M3U/EPG Endpoint Optimizations:
- Implement content caching with 5-minute TTL to reduce duplicate processing
- Add client-based event deduplication (2-second window) using IP and user agent hashing
- Support HEAD requests for efficient preflight checks
- Cache streamed EPG responses while maintaining streaming behavior for first request
2025-11-20 17:41:06 -06:00
SergeantPanda
6715bc7c5c Enhancement: Update TTL settings for client records and implement periodic refresh during active streaming 2025-10-31 11:53:16 -05:00
SergeantPanda
74280baa85 Changed read timeout for http connection for the proxy server to 10 secounds to avoid unnecessary timeouts.
Improved try_next_stream to not fail if the returned stream is the same. It will now try a different stream.
Force a client to jump ahead in the buffer if they fall to far behind.
2025-10-11 19:45:21 -05:00
SergeantPanda
50048518a9 Fixes bug where mulitiple channel initializations can occur which leads to choppy streams and zombie channels. 2025-05-27 19:05:26 -05:00
SergeantPanda
898224dc72 Fix potential issue during stream switches. 2025-05-05 17:02:28 -05:00
SergeantPanda
423020861c Replace time.sleep with gevent.sleep for improved concurrency 2025-04-30 13:32:16 -05:00
SergeantPanda
b7c543b5f5 Use gevent sleep instead of sleep. 2025-04-30 12:48:50 -05:00
SergeantPanda
bdb8d326a5 Add better logging for which channel clients are getting chunks from. 2025-04-30 12:17:11 -05:00
SergeantPanda
b439eb810c Cleanup channel lock instead of stream lock. 2025-04-28 15:05:58 -05:00
SergeantPanda
07485f87a3 Add stream health recovery and reconnection logic 2025-04-10 10:14:22 -05:00
SergeantPanda
5c74aec790 Fixes channel switching issue (release lock faster) 2025-04-10 07:38:29 -05:00
dekzter
7351264e8a centralized and lazy-loaded redis client singleton, check for manage.py commands so we don't init proxyservers (redis connection), put manage commmands before starting uwsgi 2025-04-04 16:18:12 -04:00
SergeantPanda
560345f7b1 Changed profile to stream_profile and utilized constants more for consistency. 2025-03-25 12:13:06 -05:00
SergeantPanda
2b42838bfe Added current bitrate for client and renamed transfer_rate_KBps to avg_rate_KBps for clarity. 2025-03-24 17:08:17 -05:00
SergeantPanda
b9d0b07d69 Added current bitrate for client and renamed transfer_rate_KBps to avg_rate_KBps for clarity. 2025-03-24 17:06:01 -05:00
SergeantPanda
77002beaac Improved logging to include current component name. 2025-03-22 07:42:46 -05:00
SergeantPanda
d04ba07d10 Added client speed statistics to client metadata in redis. 2025-03-21 19:59:54 -05:00
SergeantPanda
4738d301d1 Fixed regression with buffer checks when clients should be disconnecting due to failure. 2025-03-20 21:03:01 -05:00
SergeantPanda
f03b885d71 Lots more refactoring. 2025-03-19 19:03:33 -05:00
SergeantPanda
8f1c233d64 Moved stream generator out of stream_ts and into stream_generator.py 2025-03-19 16:36:01 -05:00