mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-25 19:14:00 +00:00
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:
parent
5b076fd00b
commit
72ecb88c76
1 changed files with 9 additions and 5 deletions
|
|
@ -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}`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue