Commit graph

24 commits

Author SHA1 Message Date
Seth Van Niekerk
aa5db6c3f4
Squash: Log Parsing Refactor & Enhancing 2025-12-22 15:14:46 -05:00
Seth Van Niekerk
bc72b2d4a3
Add VLC and streamlink codec parsing support 2025-12-15 20:09:54 -05:00
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
9b2ebf169b Better database connection cleanup. 2025-10-16 14:22:19 -05:00
SergeantPanda
9dc54fdcff Fix: Ensure channel_id and channel.uuid are converted to strings before processing. This fixes an issue where sending a stream switch event would fail if the event was sent from a non owning worker.
Fixes [Bug]: Manually switching active stream not working when using XC client.
Fixes #269
2025-10-09 19:10:38 -05:00
SergeantPanda
6180b4ffef Save stream stats to database. 2025-07-28 21:40:29 -05:00
SergeantPanda
838a373bea Use correct m3u_profile_id when changing streams. 2025-06-17 13:11:03 -05:00
SergeantPanda
f869daa37c Add stream type for stream (HLS/MPEGTS, ETC) 2025-06-10 09:51:56 -05:00
SergeantPanda
efaa64d00b Fix resolution not always parsing correctly. 2025-06-10 09:08:04 -05:00
SergeantPanda
47500daafa Moved some functions to channel_service 2025-06-09 19:10:52 -05:00
SergeantPanda
d59c8a9e33 Properly track current stream id during stream switches. 2025-04-27 15:52:10 -05:00
SergeantPanda
88f27d62f1 Adds current m3u profile to stats. 2025-04-27 14:43:09 -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
2f995b16fd Fixes stream switches not honouring user selected order. 2025-03-28 08:50:57 -05:00
SergeantPanda
ce6e019e6a Add m3u_profile (id) to redis when channel is initialized. 2025-03-27 19:24:43 -05:00
dekzter
bf0c50dab2 Merge branch 'epg-refactor' into stream-previews 2025-03-27 09:44:07 -04:00
dekzter
91a85020c3 modifications to allow previewing of a raw stream 2025-03-27 09:26:04 -04:00
SergeantPanda
4283162ba9 Switched profile to stream_profile in channel_service 2025-03-25 13:04:51 -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
6d84821942 Adds better checks for a channel that is partially initialized and clears it. 2025-03-20 15:56:34 -05:00
SergeantPanda
d6a452548c Automatic stream switching is working. 2025-03-20 15:28:12 -05:00
SergeantPanda
dc43fb41b5 More refactoring. 2025-03-20 08:45:23 -05:00
SergeantPanda
86e6c942d7 Final refactoring and minor bug fix for transcode stream switching. 2025-03-19 20:22:13 -05:00
SergeantPanda
569846a687 Lots more refactoring. 2025-03-19 19:45:29 -05:00