diff --git a/src/eitd/xmlutil.cpp b/src/eitd/xmlutil.cpp index ddb74690e..d26f6afe1 100644 --- a/src/eitd/xmlutil.cpp +++ b/src/eitd/xmlutil.cpp @@ -469,7 +469,6 @@ bool readEventsFromXMLTV(std::string &epgname, int &ev_count) while ((programme = xmlGetNextOccurence(programme,"programme"))) { - const char *chan = xmlGetAttribute(programme, "channel"); const char *start = xmlGetAttribute(programme, "start"); const char *stop = xmlGetAttribute(programme, "stop"); diff --git a/src/gui/webtv_setup.cpp b/src/gui/webtv_setup.cpp index c51519922..5b09b4532 100644 --- a/src/gui/webtv_setup.cpp +++ b/src/gui/webtv_setup.cpp @@ -141,7 +141,9 @@ int CWebTVSetup::exec(CMenuTarget *parent, const std::string &actionKey) { std::string tpl = "http://xxx.xxx.xxx.xxx/control/xmltv.m3u"; if (webradio) - tpl.clear(); // no template for webradio yet + tpl += "?mode=radio"; + else + tpl += "?mode=tv"; std::string entry = tpl; CKeyboardInput *e = new CKeyboardInput(LOCALE_WEBTV_XML_ENTER, &entry, 50); @@ -166,6 +168,10 @@ int CWebTVSetup::exec(CMenuTarget *parent, const std::string &actionKey) chooserDir(g_settings.livestreamScriptPath, false, action_str); return res; } + if (actionKey == "webtv_menu") + { + webradio = false; + } if (actionKey == "webradio_menu") { webradio = true; diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp index 0b641d72b..bacec6981 100644 --- a/src/nhttpd/tuxboxapi/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/controlapi.cpp @@ -3232,7 +3232,6 @@ void CControlAPI::updateBouquetCGI(CyhookHandler *hh) //----------------------------------------------------------------------------- void CControlAPI::xmltvepgCGI(CyhookHandler *hh) { - int mode = NeutrinoAPI->Zapit->getMode(); hh->ParamList["format"] = "xml"; hh->outStart(); @@ -3248,10 +3247,14 @@ void CControlAPI::xmltvepgCGI(CyhookHandler *hh) for (int i = 0; i < (int) g_bouquetManager->Bouquets.size(); i++) { - if (mode == CZapitClient::MODE_RADIO) - g_bouquetManager->Bouquets[i]->getRadioChannels(chanlist); - else - g_bouquetManager->Bouquets[i]->getTvChannels(chanlist); + // FIXME: Maybe there's a nicer solution + for (int m = 0; m < 2; m++) + { + if (m == 0) + 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) { for(int j = 0; j < (int) chanlist.size(); j++) @@ -3295,6 +3298,8 @@ void CControlAPI::xmltvepgCGI(CyhookHandler *hh) } } } + + } // for m-loop } @@ -3310,7 +3315,9 @@ void CControlAPI::xmltvm3uCGI(CyhookHandler *hh) hh->outStart(); 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 = ""; if (!hh->ParamList["host"].empty())