From d52a29cf502980516ea888dabd8c2865c3439826 Mon Sep 17 00:00:00 2001 From: BPanther Date: Sat, 10 Jun 2023 19:28:36 +0200 Subject: [PATCH] xml epg: fix multi lang epg Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/84094180a3251ada5197ffbc4bdd2a7a6a8adc63 Author: BPanther Date: 2023-06-10 (Sat, 10 Jun 2023) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/eitd/xmlutil.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/eitd/xmlutil.cpp b/src/eitd/xmlutil.cpp index d90e67618..307dec4bf 100644 --- a/src/eitd/xmlutil.cpp +++ b/src/eitd/xmlutil.cpp @@ -551,11 +551,19 @@ bool readEventsFromXMLTV(std::string &epgname, int &ev_count, bool delete_after) node = xmlNextNode(node); } node = xmlChildrenNode(programme); + int cnt = 1; while ((node = xmlGetNextOccurence(node, "desc"))) { const char *description = xmlGetData(node); - if(description != NULL) - e.appendExtendedText(std::string(ZapitTools::UTF8_to_Latin1("deu")), std::string(description)); + if (description != NULL) + { + 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); } debug(DEBUG_INFO, "XML DEBUG: %s channel 0x%012" PRIx64, chan, epgid);