mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 07:22:57 +02:00
just indentation alignments; no other code changes
Origin commit data
------------------
Branch: ni/coolstream
Commit: 87ff6fcf0f
Author: vanhofen <vanhofen@gmx.de>
Date: 2020-02-16 (Sun, 16 Feb 2020)
Origin message was:
------------------
- just indentation alignments; no other code changes
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -3265,57 +3265,55 @@ void CControlAPI::xmltvepgCGI(CyhookHandler *hh)
|
||||
{
|
||||
g_bouquetManager->Bouquets[i]->getTvChannels(chanlist);
|
||||
|
||||
// FIXME: Maybe there's a nicer solution
|
||||
for (int m = CZapitClient::MODE_TV; m < CZapitClient::MODE_ALL; m++)
|
||||
{
|
||||
if (m == CZapitClient::MODE_RADIO)
|
||||
g_bouquetManager->Bouquets[i]->getRadioChannels(chanlist);
|
||||
|
||||
if(!chanlist.empty() && !g_bouquetManager->Bouquets[i]->bHidden && g_bouquetManager->Bouquets[i]->bUser)
|
||||
{
|
||||
for(unsigned int j = 0; j < chanlist.size(); j++)
|
||||
if(!chanlist.empty() && !g_bouquetManager->Bouquets[i]->bHidden && g_bouquetManager->Bouquets[i]->bUser)
|
||||
{
|
||||
CZapitChannel * channel = chanlist[j];
|
||||
channel_id = channel->getChannelID() & 0xFFFFFFFFFFFFULL;
|
||||
channelTag = "channel id=\""+string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel_id)+"\"";
|
||||
channelData = hh->outPair("display-name", hh->outValue(channel->getName(), xml_cdata), true);
|
||||
result += hh->outObject(channelTag, channelData);
|
||||
|
||||
eList.clear();
|
||||
|
||||
CEitManager::getInstance()->getEventsServiceKey(channel_id, eList);
|
||||
|
||||
if (eList.size() == 0)
|
||||
continue;
|
||||
|
||||
if (eList.size() > 50)
|
||||
eList.erase(eList.begin()+50,eList.end());
|
||||
|
||||
for (eventIterator = eList.begin(); eventIterator != eList.end(); ++eventIterator)
|
||||
for(unsigned int j = 0; j < chanlist.size(); j++)
|
||||
{
|
||||
if (eventIterator->get_channel_id() == channel_id)
|
||||
CZapitChannel * channel = chanlist[j];
|
||||
channel_id = channel->getChannelID() & 0xFFFFFFFFFFFFULL;
|
||||
channelTag = "channel id=\""+string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel_id)+"\"";
|
||||
channelData = hh->outPair("display-name", hh->outValue(channel->getName(), xml_cdata), true);
|
||||
result += hh->outObject(channelTag, channelData);
|
||||
|
||||
eList.clear();
|
||||
|
||||
CEitManager::getInstance()->getEventsServiceKey(channel_id, eList);
|
||||
|
||||
if (eList.size() == 0)
|
||||
continue;
|
||||
|
||||
if (eList.size() > 50)
|
||||
eList.erase(eList.begin()+50,eList.end());
|
||||
|
||||
for (eventIterator = eList.begin(); eventIterator != eList.end(); ++eventIterator)
|
||||
{
|
||||
programmeTag = "programme ";
|
||||
programmeTag += "channel=\""+string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel_id)+"\" ";
|
||||
char zbuffer[25] = { 0 };
|
||||
struct tm *mtime = gmtime(&eventIterator->startTime);
|
||||
strftime(zbuffer, 21, "%Y%m%d%H%M%S %z", mtime);
|
||||
programmeTag += "start=\""+std::string(zbuffer)+"\" ";
|
||||
long _stoptime = eventIterator->startTime + eventIterator->duration;
|
||||
mtime = gmtime(&_stoptime);
|
||||
strftime(zbuffer, 21, "%Y%m%d%H%M%S %z", mtime);
|
||||
programmeTag += "stop=\""+std::string(zbuffer)+"\" ";
|
||||
if (eventIterator->get_channel_id() == channel_id)
|
||||
{
|
||||
programmeTag = "programme ";
|
||||
programmeTag += "channel=\""+string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel_id)+"\" ";
|
||||
char zbuffer[25] = { 0 };
|
||||
struct tm *mtime = gmtime(&eventIterator->startTime);
|
||||
strftime(zbuffer, 21, "%Y%m%d%H%M%S %z", mtime);
|
||||
programmeTag += "start=\""+std::string(zbuffer)+"\" ";
|
||||
long _stoptime = eventIterator->startTime + eventIterator->duration;
|
||||
mtime = gmtime(&_stoptime);
|
||||
strftime(zbuffer, 21, "%Y%m%d%H%M%S %z", mtime);
|
||||
programmeTag += "stop=\""+std::string(zbuffer)+"\" ";
|
||||
|
||||
programmeData = hh->outPair("title lang=\"de\"", hh->outValue(eventIterator->description, xml_cdata), false);
|
||||
programmeData += hh->outPair("desc lang=\"de\"", hh->outValue(eventIterator->text, xml_cdata), true);
|
||||
programmeData = hh->outPair("title lang=\"de\"", hh->outValue(eventIterator->description, xml_cdata), false);
|
||||
programmeData += hh->outPair("desc lang=\"de\"", hh->outValue(eventIterator->text, xml_cdata), true);
|
||||
|
||||
result += hh->outArrayItem(programmeTag, programmeData, false);
|
||||
result += hh->outArrayItem(programmeTag, programmeData, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // for m-loop
|
||||
}
|
||||
|
||||
result = hh->outObject("tv generator-info-name=\"Neutrino XMLTV Generator v1.0\"", result);
|
||||
@@ -3358,7 +3356,6 @@ void CControlAPI::xmltvm3uCGI(CyhookHandler *hh)
|
||||
{
|
||||
ZapitChannelList chanlist;
|
||||
|
||||
// FIXME: Maybe there's a nicer solution
|
||||
for (int m = CZapitClient::MODE_TV; m < CZapitClient::MODE_ALL; m++)
|
||||
{
|
||||
if (mode == CZapitClient::MODE_RADIO || m == CZapitClient::MODE_RADIO)
|
||||
@@ -3366,33 +3363,33 @@ void CControlAPI::xmltvm3uCGI(CyhookHandler *hh)
|
||||
else
|
||||
g_bouquetManager->Bouquets[i]->getTvChannels(chanlist);
|
||||
|
||||
if (!chanlist.empty() && !g_bouquetManager->Bouquets[i]->bHidden && g_bouquetManager->Bouquets[i]->bUser)
|
||||
{
|
||||
for (unsigned int j = 0; j < chanlist.size(); j++)
|
||||
if (!chanlist.empty() && !g_bouquetManager->Bouquets[i]->bHidden && g_bouquetManager->Bouquets[i]->bUser)
|
||||
{
|
||||
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 + "\"";
|
||||
result += " tvg-name=\"" + channel->getName() + "\"";
|
||||
if (!NeutrinoAPI->getLogoFile(channel->getChannelID()).empty())
|
||||
result += " tvg-logo=\"" + host + NeutrinoAPI->getLogoFile(channel->getChannelID()) + "\"";
|
||||
else
|
||||
result += " tvg-logo=\"\"";
|
||||
if (mode == CZapitClient::MODE_RADIO || m == CZapitClient::MODE_RADIO)
|
||||
result += " radio=\"true\"";
|
||||
else
|
||||
result += " radio=\"\"";
|
||||
result += " group-prefix=\"" + std::string(hostname) + "\"";
|
||||
result += " group-title=\"" + bouq_name + "\",";
|
||||
result += channel->getName() + "\n";
|
||||
result += url + string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel->getChannelID()) + "\n";
|
||||
for (unsigned int j = 0; j < 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 + "\"";
|
||||
result += " tvg-name=\"" + channel->getName() + "\"";
|
||||
if (!NeutrinoAPI->getLogoFile(channel->getChannelID()).empty())
|
||||
result += " tvg-logo=\"" + host + NeutrinoAPI->getLogoFile(channel->getChannelID()) + "\"";
|
||||
else
|
||||
result += " tvg-logo=\"\"";
|
||||
if (mode == CZapitClient::MODE_RADIO || m == CZapitClient::MODE_RADIO)
|
||||
result += " radio=\"true\"";
|
||||
else
|
||||
result += " radio=\"\"";
|
||||
result += " group-prefix=\"" + std::string(hostname) + "\"";
|
||||
result += " group-title=\"" + bouq_name + "\",";
|
||||
result += channel->getName() + "\n";
|
||||
result += url + string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel->getChannelID()) + "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mode != CZapitClient::MODE_ALL)
|
||||
break;
|
||||
} // for m-loop
|
||||
}
|
||||
}
|
||||
|
||||
hh->SendResult(result);
|
||||
|
Reference in New Issue
Block a user