mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-18 00:55:50 +00:00
use getChannels endpoint for fetching all instead of normal querying
This commit is contained in:
parent
7c0ce190d2
commit
1eeaefef85
1 changed files with 17 additions and 9 deletions
|
|
@ -190,19 +190,27 @@ export default function TVChannelGuide({ startDate, endDate }) {
|
|||
);
|
||||
if (firstGroup?.name) params.set('channel_group', firstGroup.name);
|
||||
}
|
||||
// Profile filter
|
||||
if (selectedProfileId && selectedProfileId !== 'all') {
|
||||
params.set('channel_profile_id', String(selectedProfileId));
|
||||
}
|
||||
// Search filter
|
||||
if (searchQuery && searchQuery.trim() !== '') {
|
||||
params.set('search', searchQuery.trim());
|
||||
|
||||
let channels = [];
|
||||
if (selectedGroupId === 'all' && allowAllGroups) {
|
||||
channels = await API.getChannels();
|
||||
} else {
|
||||
// Profile filter
|
||||
if (selectedProfileId && selectedProfileId !== 'all') {
|
||||
params.set('channel_profile_id', String(selectedProfileId));
|
||||
}
|
||||
|
||||
// Search filter
|
||||
if (searchQuery && searchQuery.trim() !== '') {
|
||||
params.set('search', searchQuery.trim());
|
||||
}
|
||||
|
||||
channels = await API.getChannelsForParams(params);
|
||||
}
|
||||
|
||||
const chans = await API.getChannelsForParams(params);
|
||||
if (cancelled) return;
|
||||
|
||||
const sorted = sortChannels(chans || []);
|
||||
const sorted = sortChannels(channels || []);
|
||||
setGuideChannels(sorted);
|
||||
|
||||
// Load program data after channels are available
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue