From 1f6f15ed73b1adc76cc6cdccbe80c89a7ea80939 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Tue, 10 Jun 2025 10:10:05 -0500 Subject: [PATCH] Add stream type to stats page. --- apps/proxy/ts_proxy/channel_status.py | 6 ++++++ frontend/src/pages/Stats.jsx | 15 ++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/apps/proxy/ts_proxy/channel_status.py b/apps/proxy/ts_proxy/channel_status.py index 77b4482d..8f1d0649 100644 --- a/apps/proxy/ts_proxy/channel_status.py +++ b/apps/proxy/ts_proxy/channel_status.py @@ -317,6 +317,9 @@ class ChannelStatus: ffmpeg_bitrate = metadata.get(ChannelMetadataField.FFMPEG_BITRATE.encode('utf-8')) if ffmpeg_bitrate: info['ffmpeg_bitrate'] = float(ffmpeg_bitrate.decode('utf-8')) + stream_type = metadata.get(ChannelMetadataField.STREAM_TYPE.encode('utf-8')) + if stream_type: + info['stream_type'] = stream_type.decode('utf-8') return info @@ -497,6 +500,9 @@ class ChannelStatus: audio_channels = metadata.get(ChannelMetadataField.AUDIO_CHANNELS.encode('utf-8')) if audio_channels: info['audio_channels'] = audio_channels.decode('utf-8') + stream_type = metadata.get(ChannelMetadataField.STREAM_TYPE.encode('utf-8')) + if stream_type: + info['stream_type'] = stream_type.decode('utf-8') return info except Exception as e: diff --git a/frontend/src/pages/Stats.jsx b/frontend/src/pages/Stats.jsx index 2b3fd8bb..fea8653e 100644 --- a/frontend/src/pages/Stats.jsx +++ b/frontend/src/pages/Stats.jsx @@ -477,11 +477,6 @@ const ChannelCard = ({ channel, clients, stopClient, stopChannel, logos, channel {/* Add stream information badges */} - {channel.video_codec && ( - - {channel.video_codec.toUpperCase()} - - )} {channel.resolution && ( {channel.resolution} @@ -492,6 +487,16 @@ const ChannelCard = ({ channel, clients, stopClient, stopChannel, logos, channel {channel.source_fps} FPS )} + {channel.video_codec && ( + + {channel.video_codec.toUpperCase()} + + )} + {channel.stream_type && ( + + {channel.stream_type.toUpperCase()} + + )} {channel.audio_codec && ( {channel.audio_codec.toUpperCase()}