controlapi: fix xmltv.m3u output for channels without logo

Origin commit data
------------------
Branch: ni/coolstream
Commit: 3f35d40e4b
Author: vanhofen <vanhofen@gmx.de>
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
This commit is contained in:
vanhofen
2018-09-09 14:09:43 +02:00
parent 9120ded952
commit ba444da235

View File

@@ -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";
}
}