MCPcopy Index your code
hub / github.com/Threadfin/Threadfin / updateChannelLogo

Function updateChannelLogo

html/js/mapping-editor.js:815–841  ·  view source on GitHub ↗
(xepg)

Source from the content-addressed store, hash-verified

813}
814
815function updateChannelLogo(xepg) {
816 var thisChannel = xEPG["epgMapping"][xepg];
817 if (thisChannel["x-update-channel-icon"] == true) {
818 var xXmltvFile = thisChannel["x-xmltv-file"];
819 var xMapping = thisChannel["x-mapping"];
820
821 if (xXmltvFile != "-" && xXmltvFile.length > 0 && xMapping != "-" && xMapping.length > 0) {
822 if (xEPG["xmltvMap"][xXmltvFile][xMapping].hasOwnProperty("icon")) {
823 var logoURL = xEPG["xmltvMap"][xXmltvFile][xMapping]["icon"];
824 thisChannel["tvg-logo"] = logoURL;
825 document.getElementById(xepg).childNodes[2].lastChild.setAttribute("src", logoURL);
826 document.getElementById("channel-logo").setAttribute("src", logoURL);
827 } else {
828 alert("No logo URL in the XMLTV file available")
829 }
830
831 }
832
833 /*
834 if (xEPG["xmltvMap"][xXmltvFile][xMapping]["icon"] != undefined) {
835
836
837 }
838 */
839
840 }
841}
842
843function saveChannelLogo(xepg) {
844 if (bulk == false) {

Callers 3

saveBulkFunction · 0.85
saveChannelIconUpdateFunction · 0.85
mappingChannelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected