mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
webradio-setup/controlapi: get webradio via xmltv
Origin commit data
------------------
Branch: ni/coolstream
Commit: 39f1a943a0
Author: vanhofen <vanhofen@gmx.de>
Date: 2020-02-14 (Fri, 14 Feb 2020)
Origin message was:
------------------
- webradio-setup/controlapi: get webradio via xmltv
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -469,7 +469,6 @@ bool readEventsFromXMLTV(std::string &epgname, int &ev_count)
|
|||||||
|
|
||||||
while ((programme = xmlGetNextOccurence(programme,"programme")))
|
while ((programme = xmlGetNextOccurence(programme,"programme")))
|
||||||
{
|
{
|
||||||
|
|
||||||
const char *chan = xmlGetAttribute(programme, "channel");
|
const char *chan = xmlGetAttribute(programme, "channel");
|
||||||
const char *start = xmlGetAttribute(programme, "start");
|
const char *start = xmlGetAttribute(programme, "start");
|
||||||
const char *stop = xmlGetAttribute(programme, "stop");
|
const char *stop = xmlGetAttribute(programme, "stop");
|
||||||
|
@@ -140,7 +140,9 @@ int CWebTVSetup::exec(CMenuTarget *parent, const std::string &actionKey)
|
|||||||
{
|
{
|
||||||
std::string tpl = "http://xxx.xxx.xxx.xxx/control/xmltv.m3u";
|
std::string tpl = "http://xxx.xxx.xxx.xxx/control/xmltv.m3u";
|
||||||
if (webradio)
|
if (webradio)
|
||||||
tpl.clear(); // no template for webradio yet
|
tpl += "?mode=radio";
|
||||||
|
else
|
||||||
|
tpl += "?mode=tv";
|
||||||
std::string entry = tpl;
|
std::string entry = tpl;
|
||||||
|
|
||||||
CKeyboardInput *e = new CKeyboardInput(LOCALE_WEBTV_XML_ENTER, &entry, 50);
|
CKeyboardInput *e = new CKeyboardInput(LOCALE_WEBTV_XML_ENTER, &entry, 50);
|
||||||
@@ -165,6 +167,10 @@ int CWebTVSetup::exec(CMenuTarget *parent, const std::string &actionKey)
|
|||||||
chooserDir(g_settings.livestreamScriptPath, false, action_str);
|
chooserDir(g_settings.livestreamScriptPath, false, action_str);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
if (actionKey == "webtv_menu")
|
||||||
|
{
|
||||||
|
webradio = false;
|
||||||
|
}
|
||||||
if (actionKey == "webradio_menu")
|
if (actionKey == "webradio_menu")
|
||||||
{
|
{
|
||||||
webradio = true;
|
webradio = true;
|
||||||
|
@@ -3248,7 +3248,6 @@ void CControlAPI::updateBouquetCGI(CyhookHandler *hh)
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void CControlAPI::xmltvepgCGI(CyhookHandler *hh)
|
void CControlAPI::xmltvepgCGI(CyhookHandler *hh)
|
||||||
{
|
{
|
||||||
int mode = NeutrinoAPI->Zapit->getMode();
|
|
||||||
hh->ParamList["format"] = "xml";
|
hh->ParamList["format"] = "xml";
|
||||||
hh->outStart();
|
hh->outStart();
|
||||||
|
|
||||||
@@ -3264,10 +3263,14 @@ void CControlAPI::xmltvepgCGI(CyhookHandler *hh)
|
|||||||
|
|
||||||
for (int i = 0; i < (int) g_bouquetManager->Bouquets.size(); i++)
|
for (int i = 0; i < (int) g_bouquetManager->Bouquets.size(); i++)
|
||||||
{
|
{
|
||||||
if (mode == CZapitClient::MODE_RADIO)
|
// FIXME: Maybe there's a nicer solution
|
||||||
g_bouquetManager->Bouquets[i]->getRadioChannels(chanlist);
|
for (int m = 0; m < 2; m++)
|
||||||
else
|
{
|
||||||
|
if (m == 0)
|
||||||
g_bouquetManager->Bouquets[i]->getTvChannels(chanlist);
|
g_bouquetManager->Bouquets[i]->getTvChannels(chanlist);
|
||||||
|
else
|
||||||
|
g_bouquetManager->Bouquets[i]->getRadioChannels(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++)
|
||||||
@@ -3311,6 +3314,8 @@ void CControlAPI::xmltvepgCGI(CyhookHandler *hh)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // for m-loop
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -3326,7 +3331,9 @@ void CControlAPI::xmltvm3uCGI(CyhookHandler *hh)
|
|||||||
hh->outStart();
|
hh->outStart();
|
||||||
std::string result = "";
|
std::string result = "";
|
||||||
|
|
||||||
int mode = NeutrinoAPI->Zapit->getMode();
|
int mode = CZapitClient::MODE_TV;
|
||||||
|
if (hh->ParamList["mode"] == "radio")
|
||||||
|
mode = CZapitClient::MODE_RADIO;
|
||||||
|
|
||||||
std::string host = "";
|
std::string host = "";
|
||||||
if (!hh->ParamList["host"].empty())
|
if (!hh->ParamList["host"].empty())
|
||||||
|
Reference in New Issue
Block a user