mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
Fix logos not being set.
This commit is contained in:
parent
64a019597d
commit
388d9e7171
1 changed files with 9 additions and 6 deletions
|
|
@ -4,6 +4,7 @@ import API from '../../api';
|
|||
import useStreamProfilesStore from '../../store/streamProfiles';
|
||||
import useEPGsStore from '../../store/epgs';
|
||||
import ChannelGroupForm from './ChannelGroup';
|
||||
import { useLogoSelection } from '../../hooks/useSmartLogos';
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
|
|
@ -44,6 +45,12 @@ const ChannelBatchForm = ({ channelIds, isOpen, onClose }) => {
|
|||
const tvgs = useEPGsStore((s) => s.tvgs);
|
||||
const tvgsById = useEPGsStore((s) => s.tvgsById);
|
||||
|
||||
const {
|
||||
logos,
|
||||
ensureLogosLoaded,
|
||||
isLoading: logosLoading,
|
||||
} = useLogoSelection();
|
||||
|
||||
const [channelGroupModelOpen, setChannelGroupModalOpen] = useState(false);
|
||||
const [selectedChannelGroup, setSelectedChannelGroup] = useState('-1');
|
||||
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||
|
|
@ -207,12 +214,8 @@ const ChannelBatchForm = ({ channelIds, isOpen, onClose }) => {
|
|||
}
|
||||
|
||||
try {
|
||||
// First, get all available logos
|
||||
const logosResponse = await API.getLogos();
|
||||
const logos = logosResponse.reduce((acc, logo) => {
|
||||
acc[logo.id] = logo;
|
||||
return acc;
|
||||
}, {});
|
||||
// Ensure logos are loaded first
|
||||
await ensureLogosLoaded();
|
||||
|
||||
const channelsMap = useChannelsStore.getState().channels;
|
||||
const updates = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue