MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / updateEpgSourceSettings

Method updateEpgSourceSettings

frontend/src/api.js:3933–3950  ·  view source on GitHub ↗
(sourceId, settings)

Source from the content-addressed store, hash-verified

3931 }
3932
3933 static async updateEpgSourceSettings(sourceId, settings) {
3934 try {
3935 // Read current custom_properties from the store to merge, not replace
3936 const epgs = useEPGsStore.getState().epgs;
3937 const source = epgs[sourceId];
3938 const cp = { ...(source?.custom_properties || {}), ...settings };
3939
3940 const response = await request(`${host}/api/epg/sources/${sourceId}/`, {
3941 method: 'PATCH',
3942 body: { custom_properties: cp },
3943 });
3944
3945 useEPGsStore.getState().updateEPG(response);
3946 return response;
3947 } catch (e) {
3948 errorNotification('Failed to update EPG source settings', e);
3949 }
3950 }
3951
3952 static async updateSDSettings(sourceId, settings) {
3953 return API.updateEpgSourceSettings(sourceId, settings);

Callers 3

updateSDSettingsMethod · 0.80
handleToggleFunction · 0.80
saveSettingFunction · 0.80

Calls 3

requestFunction · 0.85
errorNotificationFunction · 0.85
updateEPGMethod · 0.80

Tested by

no test coverage detected