- webepg: align new keys/values to the existing keys/values

By courtesy of TangoCash. :)

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2018-09-01 14:34:25 +02:00
committed by Thilo Graf
parent 7c83250836
commit b00f1e53df
2 changed files with 11 additions and 11 deletions

View File

@@ -714,15 +714,15 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.webtv_xml.push_back(webtv_xml);
}
g_settings.web_epg.clear();
int webepg_count = configfile.getInt32("webepg_count", 0);
g_settings.webepg_xml.clear();
int webepg_count = configfile.getInt32("webepg_xml_count", 0);
if (webepg_count) {
for (int i = 0; i < webepg_count; i++) {
std::string k = "webepg_" + to_string(i);
std::string web_epg = configfile.getString(k, "");
if (web_epg.empty())
std::string k = "webepg_xml_" + to_string(i);
std::string webepg_xml = configfile.getString(k, "");
if (webepg_xml.empty())
continue;
g_settings.web_epg.push_back(web_epg);
g_settings.webepg_xml.push_back(webepg_xml);
}
}
@@ -1426,12 +1426,12 @@ void CNeutrinoApp::saveSetup(const char * fname)
configfile.setInt32 ( "webtv_xml_count", g_settings.webtv_xml.size());
int webepg_count = 0;
for (std::list<std::string>::iterator it = g_settings.web_epg.begin(); it != g_settings.web_epg.end(); ++it) {
std::string k = "webepg_" + to_string(webepg_count);
for (std::list<std::string>::iterator it = g_settings.webepg_xml.begin(); it != g_settings.webepg_xml.end(); ++it) {
std::string k = "webepg_xml_" + to_string(webepg_count);
configfile.setString(k, *it);
webepg_count++;
}
configfile.setInt32 ( "webepg_count", g_settings.web_epg.size());
configfile.setInt32 ( "webepg_xml_count", g_settings.webepg_xml.size());
saveKeys();
@@ -2583,7 +2583,7 @@ TIMER_STOP("################################## after all #######################
delete hintBox;
}
for (std::list<std::string>::iterator it = g_settings.web_epg.begin(); it != g_settings.web_epg.end(); ++it)
for (std::list<std::string>::iterator it = g_settings.webepg_xml.begin(); it != g_settings.webepg_xml.end(); ++it)
g_Sectionsd->readSIfromIPTVXML((*it).c_str());
RealRun();

View File

@@ -324,7 +324,7 @@ struct SNeutrinoSettings
std::list<std::string> webtv_xml;
std::list<std::string> webradio_xml;
std::list<std::string> web_epg;
std::list<std::string> webepg_xml;
//personalize
enum PERSONALIZE_SETTINGS //settings.h