Add EPG source name before epg name in channel edit form.

This commit is contained in:
SergeantPanda 2025-09-11 13:26:40 -05:00
parent 43afbd4505
commit 0a8b8919b9

View file

@ -651,9 +651,19 @@ const ChannelForm = ({ channel = null, isOpen, onClose }) => {
}
readOnly
value={
formik.values.epg_data_id
? tvgsById[formik.values.epg_data_id].name
: 'Dummy'
(() => {
const tvg = tvgsById[formik.values.epg_data_id];
const epgSource = tvg && epgs[tvg.epg_source];
if (epgSource && formik.values.name) {
return `${epgSource.name} - ${formik.values.name}`;
} else if (epgSource) {
return epgSource.name;
} else if (formik.values.name) {
return formik.values.name;
} else {
return 'Dummy';
}
})()
}
onClick={() => setEpgPopoverOpened(true)}
size="xs"