MCPcopy Create free account
hub / github.com/Threadfin/Threadfin / changeChannelLogo

Function changeChannelLogo

ts/menu_ts.ts:2474–2498  ·  view source on GitHub ↗
(epgMapId: string)

Source from the content-addressed store, hash-verified

2472}
2473
2474function changeChannelLogo(epgMapId: string) {
2475
2476 const channel: Object = SERVER['xepg']['epgMapping'][epgMapId];
2477
2478 const xmlTvFileSelect = document.getElementById('popup-xmltv') as HTMLSelectElement;
2479 const xmlTvFile = xmlTvFileSelect.options[xmlTvFileSelect.selectedIndex].value;
2480
2481 const xmlTvIdInput = document.getElementById('xmltv-id-picker-input') as HTMLInputElement;
2482 const newXmlTvId = xmlTvIdInput.value;
2483
2484 const updateLogo = !BULK_EDIT || (document.getElementById('update-icon') as HTMLInputElement).checked;
2485
2486 let logo: string;
2487
2488 if (updateLogo == true && xmlTvFile != 'Threadfin Dummy') {
2489
2490 if (SERVER['xepg']['xmltvMap'][xmlTvFile].hasOwnProperty(newXmlTvId)) {
2491 logo = SERVER['xepg']['xmltvMap'][xmlTvFile][newXmlTvId]['icon'];
2492 } else {
2493 logo = channel['tvg-logo'];
2494 }
2495
2496 }
2497
2498}
2499
2500function savePopupData(dataType: string, id: string, remove: Boolean, option: number) {
2501

Callers 1

checkXmltvChannelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected