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

Method getFiles

ts/menu_ts.ts:2122–2151  ·  view source on GitHub ↗
(set: string)

Source from the content-addressed store, hash-verified

2120 File: string
2121
2122 getFiles(set: string): any {
2123 var fileIDs: string[] = getObjKeys(SERVER["xepg"]["xmltvMap"])
2124 var values = new Array("-");
2125 var text = new Array("-");
2126
2127 for (let i = 0; i < fileIDs.length; i++) {
2128 if (fileIDs[i] != "Threadfin Dummy") {
2129 values.push(getValueFromProviderFile(fileIDs[i], "xmltv", "file.threadfin"))
2130 text.push(getValueFromProviderFile(fileIDs[i], "xmltv", "name"))
2131 } else {
2132 values.push(fileIDs[i])
2133 text.push(fileIDs[i])
2134 }
2135
2136 }
2137
2138 var select = document.createElement("SELECT")
2139 for (let i = 0; i < text.length; i++) {
2140 var option = document.createElement("OPTION")
2141 option.setAttribute("value", values[i])
2142 option.innerText = text[i]
2143 select.appendChild(option)
2144 }
2145
2146 if (set != "") {
2147 (select as HTMLSelectElement).value = set
2148 }
2149
2150 return select
2151 }
2152
2153 /**
2154 * @param xmlTvFile XML file path to get EPG from.

Callers 1

openPopUpFunction · 0.95

Calls 2

getObjKeysFunction · 0.70
getValueFromProviderFileFunction · 0.70

Tested by

no test coverage detected