Fix bug where creating a channel from a stream that isn't displayed in the table has invalid stream name.

This commit is contained in:
SergeantPanda 2025-07-29 14:59:03 -05:00
parent 5b076fd00b
commit 72ecb88c76

View file

@ -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}`,