From 72ecb88c76a9b1be8f4ef88b7ef0b38c40f28cf7 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Tue, 29 Jul 2025 14:59:03 -0500 Subject: [PATCH] Fix bug where creating a channel from a stream that isn't displayed in the table has invalid stream name. --- frontend/src/components/tables/StreamsTable.jsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/tables/StreamsTable.jsx b/frontend/src/components/tables/StreamsTable.jsx index 616a52a3..4731c019 100644 --- a/frontend/src/components/tables/StreamsTable.jsx +++ b/frontend/src/components/tables/StreamsTable.jsx @@ -103,10 +103,6 @@ const StreamRowActions = ({ row.original.id, 'Hash:', row.original.stream_hash, - 'Quality:', - row.original.quality, - 'Stats:', - row.original.stream_stats ); handleWatchStream(row.original.stream_hash); }, [row.original, handleWatchStream]); // Add proper dependencies to ensure correct stream @@ -414,8 +410,16 @@ const StreamsTable = ({ }) => { try { const selectedChannelProfileId = useChannelsStore.getState().selectedProfileId; + // Try to fetch the actual stream data for selected streams + let streamsData = []; + try { + streamsData = await API.getStreamsByIds(selectedStreamIds); + } catch (error) { + console.warn('Could not fetch stream details, using IDs only:', error); + } + const streamData = selectedStreamIds.map(streamId => { - const stream = data.find(s => s.id === streamId); + const stream = streamsData.find(s => s.id === streamId); return { stream_id: streamId, name: stream?.name || `Stream ${streamId}`,