fixed playlists not getting groups updated after m3u addition

This commit is contained in:
dekzter 2025-03-24 17:30:22 -04:00
parent ddc35c3e7b
commit bc460d73b4
2 changed files with 6 additions and 2 deletions

View file

@ -19,7 +19,7 @@ export const WebsocketProvider = ({ children }) => {
const { fetchStreams } = useStreamsStore();
const { setChannelStats, fetchChannelGroups } = useChannelsStore();
const { setRefreshProgress } = usePlaylistsStore();
const { fetchPlaylists, setRefreshProgress } = usePlaylistsStore();
const { fetchEPGData } = useEPGsStore();
const ws = useRef(null);
@ -68,6 +68,7 @@ export const WebsocketProvider = ({ children }) => {
fetchStreams();
fetchChannelGroups();
fetchEPGData();
fetchPlaylists();
}
setRefreshProgress(event.data.account, event.data.progress);
}

View file

@ -57,13 +57,16 @@ const M3U = ({ playlist = null, isOpen, onClose, playlistCreated = false }) => {
uploaded_file: file,
});
} else {
setLoadingText('Loading groups...');
newPlaylist = await API.addPlaylist({
...values,
uploaded_file: file,
});
await fetchChannelGroups();
// Don't prompt for group filters, but keeping this here
// in case we want to revive it
newPlaylist = null;
}
resetForm();