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

Function getFormattedValues

frontend/src/utils/forms/ChannelUtils.js:214–233  ·  view source on GitHub ↗
(values)

Source from the content-addressed store, hash-verified

212};
213
214export const getFormattedValues = (values) => {
215 const formattedValues = { ...values };
216
217 // Convert empty or "0" stream_profile_id to null for the API
218 if (
219 !formattedValues.stream_profile_id ||
220 formattedValues.stream_profile_id === '0'
221 ) {
222 formattedValues.stream_profile_id = null;
223 }
224
225 // Ensure tvg_id is properly included (no empty strings)
226 formattedValues.tvg_id = formattedValues.tvg_id || null;
227
228 // Ensure tvc_guide_stationid is properly included (no empty strings)
229 formattedValues.tvc_guide_stationid =
230 formattedValues.tvc_guide_stationid || null;
231
232 return formattedValues;
233};
234
235export const handleEpgUpdate = async (
236 channel,

Callers 2

onSubmitFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected