xml epg: fix multi lang epg

Signed-off-by: Thilo Graf <dbt@novatux.de>

It was not indicated why this fix was necessary.
This commit is contained in:
BPanther
2023-06-10 19:28:36 +02:00
committed by Thilo Graf
parent aa13ff5fba
commit 8fa6b6ffc3

View File

@@ -551,11 +551,19 @@ bool readEventsFromXMLTV(std::string &epgname, int &ev_count, bool delete_after)
node = xmlNextNode(node); node = xmlNextNode(node);
} }
node = xmlChildrenNode(programme); node = xmlChildrenNode(programme);
int cnt = 1;
while ((node = xmlGetNextOccurence(node, "desc"))) while ((node = xmlGetNextOccurence(node, "desc")))
{ {
const char *description = xmlGetData(node); const char *description = xmlGetData(node);
if(description != NULL) if (description != NULL)
e.appendExtendedText(std::string(ZapitTools::UTF8_to_Latin1("deu")), std::string(description)); {
std::string desc = std::string(description);
std::string nline = "";
if (cnt > 1)
nline = '\n';
e.appendExtendedText(std::string(ZapitTools::UTF8_to_Latin1("deu")), nline + desc);
cnt++;
}
node = xmlNextNode(node); node = xmlNextNode(node);
} }
debug(DEBUG_INFO, "XML DEBUG: %s channel 0x%012" PRIx64, chan, epgid); debug(DEBUG_INFO, "XML DEBUG: %s channel 0x%012" PRIx64, chan, epgid);