controlapi: reformat CControlAPI::xmltvm3uCGI() function; no other changes

Origin commit data
------------------
Branch: ni/coolstream
Commit: a68703b238
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-09-09 (Sun, 09 Sep 2018)

Origin message was:
------------------
- controlapi: reformat CControlAPI::xmltvm3uCGI() function; no other changes

------------------
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 13:26:51 +02:00
parent 357b10d40b
commit d62bd2dc5b

View File

@@ -3312,10 +3312,10 @@ void CControlAPI::xmltvm3uCGI(CyhookHandler *hh)
int mode = NeutrinoAPI->Zapit->getMode(); int mode = NeutrinoAPI->Zapit->getMode();
// build url // build url
std::string url = ""; std::string url = "";
if(!hh->ParamList["host"].empty()) if (!hh->ParamList["host"].empty())
url = "http://"+hh->ParamList["host"]; url = "http://" + hh->ParamList["host"];
else else
url = "http://"+hh->HeaderList["Host"]; url = "http://" + hh->HeaderList["Host"];
std::string lurl = url; std::string lurl = url;
/* strip off optional custom port */ /* strip off optional custom port */
@@ -3333,15 +3333,15 @@ void CControlAPI::xmltvm3uCGI(CyhookHandler *hh)
g_bouquetManager->Bouquets[i]->getRadioChannels(chanlist); g_bouquetManager->Bouquets[i]->getRadioChannels(chanlist);
else else
g_bouquetManager->Bouquets[i]->getTvChannels(chanlist); g_bouquetManager->Bouquets[i]->getTvChannels(chanlist);
if(!chanlist.empty() && !g_bouquetManager->Bouquets[i]->bHidden && g_bouquetManager->Bouquets[i]->bUser) if (!chanlist.empty() && !g_bouquetManager->Bouquets[i]->bHidden && g_bouquetManager->Bouquets[i]->bUser)
{ {
for(int j = 0; j < (int) chanlist.size(); j++) for (int j = 0; j < (int) chanlist.size(); j++)
{ {
CZapitChannel * channel = chanlist[j]; CZapitChannel *channel = chanlist[j];
std::string bouq_name = g_bouquetManager->Bouquets[i]->bName; 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); 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=\""+lurl+NeutrinoAPI->getLogoFile(channel->getChannelID())+"\" group-title=\""+bouq_name+"\","+channel->getName()+"\n"; result += "#EXTINF:-1 tvg-id=\"" + chan_id_short + "\" tvg-logo=\"" + lurl + NeutrinoAPI->getLogoFile(channel->getChannelID()) + "\" group-title=\"" + bouq_name + "\"," + channel->getName() + "\n";
result += url+string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel->getChannelID())+"\n"; result += url + string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel->getChannelID()) + "\n";
} }
} }
} }