MCPcopy Index your code
hub / github.com/Dispatcharr/Dispatcharr / setChannelEPG

Method setChannelEPG

frontend/src/api.js:890–918  ·  view source on GitHub ↗
(channelId, epgDataId)

Source from the content-addressed store, hash-verified

888 }
889
890 static async setChannelEPG(channelId, epgDataId) {
891 try {
892 const response = await request(
893 `${host}/api/channels/channels/${channelId}/set-epg/`,
894 {
895 method: 'POST',
896 body: { epg_data_id: epgDataId },
897 }
898 );
899
900 // Update the channel in the store with the refreshed data
901 if (response.channel) {
902 useChannelsStore.getState().updateChannel(response.channel);
903 }
904
905 // Show notification about task status
906 if (response.task_status) {
907 notifications.show({
908 title: 'EPG Status',
909 message: response.task_status,
910 color: 'blue',
911 });
912 }
913
914 return response;
915 } catch (e) {
916 errorNotification('Failed to update channel EPG', e);
917 }
918 }
919
920 static async setChannelNamesFromEpg(channelIds) {
921 try {

Callers 1

setChannelEPGFunction · 0.80

Calls 3

requestFunction · 0.85
errorNotificationFunction · 0.85
updateChannelMethod · 0.80

Tested by

no test coverage detected