From ba444da2359ca7391258c76e1bd62c2e9afdd02c Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 9 Sep 2018 14:09:43 +0200 Subject: [PATCH] controlapi: fix xmltv.m3u output for channels without logo Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/3f35d40e4bb9d1fdc95c66ea81161574a96104a7 Author: vanhofen Date: 2018-09-09 (Sun, 09 Sep 2018) Origin message was: ------------------ - controlapi: fix xmltv.m3u output for channels without logo ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/nhttpd/tuxboxapi/controlapi.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp index a3cc75f9e..4fda19735 100644 --- a/src/nhttpd/tuxboxapi/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/controlapi.cpp @@ -3341,7 +3341,13 @@ void CControlAPI::xmltvm3uCGI(CyhookHandler *hh) CZapitChannel *channel = chanlist[j]; std::string bouq_name = g_bouquetManager->Bouquets[i]->bName; std::string chan_id_short = string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel->getChannelID() & 0xFFFFFFFFFFFFULL); - result += "#EXTINF:-1 tvg-id=\"" + chan_id_short + "\" tvg-logo=\"" + host + NeutrinoAPI->getLogoFile(channel->getChannelID()) + "\" group-title=\"" + bouq_name + "\"," + channel->getName() + "\n"; + result += "#EXTINF:-1 tvg-id=\"" + chan_id_short + "\""; + if (!NeutrinoAPI->getLogoFile(channel->getChannelID()).empty()) + result += " tvg-logo=\"" + host + NeutrinoAPI->getLogoFile(channel->getChannelID()) + "\""; + else + result += " tvg-logo=\"\""; + result += " group-title=\"" + bouq_name + "\","; + result += channel->getName() + "\n"; result += url + string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel->getChannelID()) + "\n"; } }