Dummy new times

Fixed searching for XMLTV file (Mapping)
This commit is contained in:
xteve-project
2020-11-20 22:13:52 +01:00
parent 0310b7e738
commit 014f5b7218
7 changed files with 64 additions and 46 deletions

View File

@@ -226,7 +226,7 @@ function createSearchObj() {
SEARCH_MAPPING = new Object();
var data = SERVER["xepg"]["epgMapping"];
var channels = getObjKeys(data);
var channelKeys = ["x-active", "x-channelID", "x-name", "_file.m3u.name", "x-group-title"];
var channelKeys = ["x-active", "x-channelID", "x-name", "_file.m3u.name", "x-group-title", "x-xmltv-file"];
channels.forEach(function (id) {
channelKeys.forEach(function (key) {
if (key == "x-active") {
@@ -240,7 +240,15 @@ function createSearchObj() {
}
}
else {
SEARCH_MAPPING[id] = SEARCH_MAPPING[id] + data[id][key] + " ";
if (key == "x-xmltv-file") {
var xmltvFile = getValueFromProviderFile(data[id][key], "xmltv", "name");
if (xmltvFile != undefined) {
SEARCH_MAPPING[id] = SEARCH_MAPPING[id] + xmltvFile + " ";
}
}
else {
SEARCH_MAPPING[id] = SEARCH_MAPPING[id] + data[id][key] + " ";
}
}
});
});