fixing some bugs

This commit is contained in:
dekzter 2025-03-20 18:34:59 -04:00
parent 843c02a02f
commit c9d766c3db
2 changed files with 6 additions and 3 deletions

View file

@ -262,7 +262,7 @@ class ChannelViewSet(viewsets.ModelViewSet):
errors.append({"item": item, "error": str(e)})
continue
channel_group, _ = ChannelGroup.objects.get_or_create(name=stream.group_name)
channel_group = stream.channel_group
# Determine channel number: if provided, use it (if free); else auto assign.
provided_number = item.get('channel_number')

View file

@ -17,7 +17,7 @@ export const WebsocketProvider = ({ children }) => {
const [val, setVal] = useState(null);
const { fetchStreams } = useStreamsStore();
const { setChannelStats } = useChannelsStore();
const { setChannelStats, fetchChannelGroups } = useChannelsStore();
const { setRefreshProgress } = usePlaylistsStore();
const ws = useRef(null);
@ -62,7 +62,10 @@ export const WebsocketProvider = ({ children }) => {
color: 'green.5',
});
} else if (event.data.progress) {
console.log('calling set progress');
if (event.data.progress == 100) {
fetchStreams();
fetchChannelGroups();
}
setRefreshProgress(event.data.account, event.data.progress);
}
break;