From 90277c99822a88a26c1e539fc05e8b439a9acdc8 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Sun, 5 Apr 2015 22:30:04 +0200 Subject: [PATCH] - neutrinoyparser.cpp: improve display of channels w/o logo --- .../tuxboxapi/coolstream/neutrinoyparser.cpp | 33 ++++++++++++++++--- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp b/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp index e65986b40..452e49b33 100644 --- a/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp @@ -353,6 +353,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std: if(!hh->WebserverConfigList["Tuxbox.LogosURL"].empty()) have_logos = true; + for(int j = 0; j < (int) channels.size(); j++) { CZapitChannel * channel = channels[j]; @@ -366,11 +367,33 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std: std::string bouquetstr = (BouquetNr >= 0) ? ("&bouquet=" + itoa(BouquetNr)) : ""; yresult += ""; - if(have_logos) - yresult += string_printf("", classname, channel->getChannelID(), - (NeutrinoAPI->getLogoFile(hh->WebserverConfigList["Tuxbox.LogosURL"], channel->getChannelID())).c_str()); + if (have_logos) { + std::string channel_logo = NeutrinoAPI->getLogoFile(hh->WebserverConfigList["Tuxbox.LogosURL"], channel->getChannelID()); + std::string zaplink; + if (channel_logo.empty()) + zaplink = channel->getName().c_str(); + else + zaplink = string_printf( + "\"%s\"" + , channel_logo.c_str() + , channel->getName().c_str() + , channel->getName().c_str() + ); + + yresult += string_printf( + "" + "" + "%s" + "" + "" + , classname + , (channel_logo.empty() ? "no_logo" : "") + , channel->getChannelID() + , zaplink.c_str() + , channel->getName().c_str() + , channel->getName().c_str() + ); + } /* timer slider */ if(event && event->duration > 0)