additional logging for troubleshooting

This commit is contained in:
kappa118 2025-02-27 17:09:17 -05:00
parent c8451903f9
commit eec6e06b1d

View file

@ -60,12 +60,18 @@ const TVChannelGuide = ({ startDate, endDate }) => {
useEffect(() => {
const fetchPrograms = async () => {
console.log('Fetching program grid...');
const programs = await API.getGrid();
console.log(`Received ${programs.length} programs`);
const programIds = [...new Set(programs.map((prog) => prog.tvg_id))];
console.log('program tvg-ids');
console.log(programIds);
const filteredChannels = channels.filter((ch) =>
programIds.includes(ch.tvg_id)
);
console.log(
`found ${filteredChannels.length} channels with matching tvg-ids`
);
console.log(filteredChannels);
setGuideChannels(filteredChannels);
setActiveChannels(guideChannels.map((channel) => channel.channel_name));