- split epg_read from epg_save ...

... to get the possibility to read EPG-data from an external device
at boot w/o saving the own data at shutdown/standby.
This commit is contained in:
svenhoefer
2014-12-04 16:47:30 +01:00
parent 38687897c5
commit 4c621f1dec
8 changed files with 73 additions and 25 deletions

View File

@@ -512,6 +512,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.epg_save = configfile.getBool("epg_save", false);
g_settings.epg_save_standby = configfile.getBool("epg_save_standby", true);
g_settings.epg_read = configfile.getBool("epg_read", g_settings.epg_save);
g_settings.epg_scan = configfile.getInt32("epg_scan", CEpgScan::SCAN_CURRENT);
g_settings.epg_scan_mode = configfile.getInt32("epg_scan_mode", CEpgScan::MODE_OFF);
// backward-compatible check
@@ -1018,6 +1019,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
// epg
configfile.setBool("epg_save", g_settings.epg_save);
configfile.setBool("epg_save_standby", g_settings.epg_save_standby);
configfile.setBool("epg_read", g_settings.epg_read);
configfile.setInt32("epg_scan", g_settings.epg_scan);
configfile.setInt32("epg_scan_mode", g_settings.epg_scan_mode);
configfile.setInt32("epg_cache_time" ,g_settings.epg_cache );
@@ -1690,7 +1692,7 @@ void CNeutrinoApp::InitZapper()
struct stat my_stat;
g_InfoViewer->start();
if (g_settings.epg_save){
if (g_settings.epg_read) {
if(stat(g_settings.epg_dir.c_str(), &my_stat) == 0)
g_Sectionsd->readSIfromXML(g_settings.epg_dir.c_str());
}