mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 07:22:57 +02:00
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:
@@ -3306,47 +3306,47 @@ void CControlAPI::xmltvepgCGI(CyhookHandler *hh)
|
||||
|
||||
void CControlAPI::xmltvm3uCGI(CyhookHandler *hh)
|
||||
{
|
||||
hh->outStart();
|
||||
std::string result = "";
|
||||
hh->outStart();
|
||||
std::string result = "";
|
||||
|
||||
int mode = NeutrinoAPI->Zapit->getMode();
|
||||
// build url
|
||||
std::string url = "";
|
||||
if(!hh->ParamList["host"].empty())
|
||||
url = "http://"+hh->ParamList["host"];
|
||||
else
|
||||
url = "http://"+hh->HeaderList["Host"];
|
||||
int mode = NeutrinoAPI->Zapit->getMode();
|
||||
// build url
|
||||
std::string url = "";
|
||||
if (!hh->ParamList["host"].empty())
|
||||
url = "http://" + hh->ParamList["host"];
|
||||
else
|
||||
url = "http://" + hh->HeaderList["Host"];
|
||||
|
||||
std::string lurl = url;
|
||||
/* strip off optional custom port */
|
||||
if (url.rfind(":") != 4)
|
||||
url = url.substr(0, url.rfind(":"));
|
||||
/* strip off optional custom port */
|
||||
if (url.rfind(":") != 4)
|
||||
url = url.substr(0, url.rfind(":"));
|
||||
|
||||
url += ":31339/id=";
|
||||
url += ":31339/id=";
|
||||
|
||||
result += "#EXTM3U\n";
|
||||
result += "#EXTM3U\n";
|
||||
|
||||
for (int i = 0; i < (int) g_bouquetManager->Bouquets.size(); i++)
|
||||
{
|
||||
ZapitChannelList chanlist;
|
||||
if (mode == CZapitClient::MODE_RADIO)
|
||||
g_bouquetManager->Bouquets[i]->getRadioChannels(chanlist);
|
||||
else
|
||||
g_bouquetManager->Bouquets[i]->getTvChannels(chanlist);
|
||||
if(!chanlist.empty() && !g_bouquetManager->Bouquets[i]->bHidden && g_bouquetManager->Bouquets[i]->bUser)
|
||||
{
|
||||
for(int j = 0; j < (int) chanlist.size(); j++)
|
||||
{
|
||||
CZapitChannel * channel = chanlist[j];
|
||||
for (int i = 0; i < (int) g_bouquetManager->Bouquets.size(); i++)
|
||||
{
|
||||
ZapitChannelList chanlist;
|
||||
if (mode == CZapitClient::MODE_RADIO)
|
||||
g_bouquetManager->Bouquets[i]->getRadioChannels(chanlist);
|
||||
else
|
||||
g_bouquetManager->Bouquets[i]->getTvChannels(chanlist);
|
||||
if (!chanlist.empty() && !g_bouquetManager->Bouquets[i]->bHidden && g_bouquetManager->Bouquets[i]->bUser)
|
||||
{
|
||||
for (int j = 0; j < (int) chanlist.size(); j++)
|
||||
{
|
||||
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=\""+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 += "#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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hh->SendResult(result);
|
||||
hh->SendResult(result);
|
||||
}
|
||||
//-------------------------------------------------------------------------
|
||||
// audio_no : (optional) audio channel
|
||||
|
Reference in New Issue
Block a user