keeping all auto xml epg together

Origin commit data
------------------
Commit: dfe8dfc96f
Author: TangoCash <eric@loxat.de>
Date: 2021-09-13 (Mon, 13 Sep 2021)
This commit is contained in:
TangoCash
2021-09-13 17:37:15 +02:00
committed by vanhofen
parent 3e968eecf1
commit c40fc9c43e
5 changed files with 8 additions and 22 deletions

View File

@@ -278,7 +278,7 @@ int CWebChannelsSetup::Show()
} }
webchannels_auto(); webchannels_auto();
g_Zapit->reinitChannels(); g_Zapit->reinitChannels();
CNeutrinoApp::getInstance()->xmltv_xml_m3u_readepg(); CNeutrinoApp::getInstance()->xmltv_xml_auto_readepg();
changed = false; changed = false;
hint.hide(); hint.hide();
} }

View File

@@ -969,7 +969,6 @@ int CNeutrinoApp::loadSetup(const char *fname)
} }
g_settings.xmltv_xml_auto.clear(); g_settings.xmltv_xml_auto.clear();
g_settings.xmltv_xml_m3u.clear();
g_settings.livestreamResolution = configfile.getInt32("livestreamResolution", 1920); g_settings.livestreamResolution = configfile.getInt32("livestreamResolution", 1920);
g_settings.livestreamScriptPath = configfile.getString("livestreamScriptPath", WEBTVDIR); g_settings.livestreamScriptPath = configfile.getString("livestreamScriptPath", WEBTVDIR);
@@ -3329,7 +3328,7 @@ TIMER_STOP("################################## after all #######################
#endif #endif
xmltv_xml_readepg(); xmltv_xml_readepg();
xmltv_xml_m3u_readepg(); xmltv_xml_auto_readepg();
RealRun(); RealRun();
ExitRun(g_info.hw_caps->can_shutdown); ExitRun(g_info.hw_caps->can_shutdown);
@@ -4727,7 +4726,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
else if (msg == NeutrinoMessages::EVT_RELOAD_XMLTV) { else if (msg == NeutrinoMessages::EVT_RELOAD_XMLTV) {
printf("CNeutrinoApp::handleMsg: reload xmltv epg\n"); printf("CNeutrinoApp::handleMsg: reload xmltv epg\n");
xmltv_xml_readepg(); xmltv_xml_readepg();
xmltv_xml_m3u_readepg(); xmltv_xml_auto_readepg();
return messages_return::handled; return messages_return::handled;
} }
if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000)) { if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000)) {

View File

@@ -257,22 +257,11 @@ public:
{ {
for (std::list<std::string>::iterator it = g_settings.xmltv_xml.begin(); it != g_settings.xmltv_xml.end(); it++) for (std::list<std::string>::iterator it = g_settings.xmltv_xml.begin(); it != g_settings.xmltv_xml.end(); it++)
g_Sectionsd->readSIfromXMLTV((*it).c_str()); g_Sectionsd->readSIfromXMLTV((*it).c_str());
}
void xmltv_xml_auto_readepg()
{
for (std::list<std::string>::iterator it = g_settings.xmltv_xml_auto.begin(); it != g_settings.xmltv_xml_auto.end(); it++) for (std::list<std::string>::iterator it = g_settings.xmltv_xml_auto.begin(); it != g_settings.xmltv_xml_auto.end(); it++)
g_Sectionsd->readSIfromXMLTV((*it).c_str()); g_Sectionsd->readSIfromXMLTV((*it).c_str());
} }
void g_settings_xmltv_xml_m3u_clear()
{
g_settings.xmltv_xml_m3u.clear();
}
void g_settings_xmltv_xml_m3u_pushback(std::string _epg_url)
{
g_settings.xmltv_xml_m3u.push_back(_epg_url);
}
void xmltv_xml_m3u_readepg()
{
for (std::list<std::string>::iterator it = g_settings.xmltv_xml_m3u.begin(); it != g_settings.xmltv_xml_m3u.end(); it++)
g_Sectionsd->readSIfromXMLTV((*it).c_str());
}
}; };
#endif #endif

View File

@@ -753,7 +753,6 @@ struct SNeutrinoSettings
// xmltv // xmltv
std::list<std::string> xmltv_xml; // see http://wiki.xmltv.org/ std::list<std::string> xmltv_xml; // see http://wiki.xmltv.org/
std::list<std::string> xmltv_xml_auto; std::list<std::string> xmltv_xml_auto;
std::list<std::string> xmltv_xml_m3u; // contains temp xml from m3u
int livestreamResolution; int livestreamResolution;
std::string livestreamScriptPath; std::string livestreamScriptPath;

View File

@@ -535,7 +535,6 @@ void CBouquetManager::loadBouquets(bool ignoreBouquetFile)
} }
CNeutrinoApp::getInstance()->g_settings_xmltv_xml_auto_clear(); CNeutrinoApp::getInstance()->g_settings_xmltv_xml_auto_clear();
CNeutrinoApp::getInstance()->g_settings_xmltv_xml_m3u_clear();
loadWebtv(); loadWebtv();
loadWebradio(); loadWebradio();
loadLogos(); loadLogos();
@@ -1039,10 +1038,10 @@ void CBouquetManager::loadWebchannels(int mode)
{ {
std::vector<std::string> epg_list = ::split(epg_url, ','); std::vector<std::string> epg_list = ::split(epg_url, ',');
for (std::vector<std::string>::iterator it_epg = epg_list.begin(); it_epg != epg_list.end(); it_epg++) for (std::vector<std::string>::iterator it_epg = epg_list.begin(); it_epg != epg_list.end(); it_epg++)
CNeutrinoApp::getInstance()->g_settings_xmltv_xml_m3u_pushback((*it_epg)); CNeutrinoApp::getInstance()->g_settings_xmltv_xml_auto_pushback((*it_epg));
} }
else else
CNeutrinoApp::getInstance()->g_settings_xmltv_xml_m3u_pushback(epg_url); CNeutrinoApp::getInstance()->g_settings_xmltv_xml_auto_pushback(epg_url);
} }
} }
if (strLine.find(M3U_INFO_MARKER) != std::string::npos) if (strLine.find(M3U_INFO_MARKER) != std::string::npos)