mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
neutrino.cpp: split fill and send sectionsd config;
set sectionsd config before start it
This commit is contained in:
@@ -1548,9 +1548,8 @@ bool sectionsd_isReady(void);
|
|||||||
#define LCD_UPDATE_TIME_RADIO_MODE (6 * 1000 * 1000)
|
#define LCD_UPDATE_TIME_RADIO_MODE (6 * 1000 * 1000)
|
||||||
#define LCD_UPDATE_TIME_TV_MODE (60 * 1000 * 1000)
|
#define LCD_UPDATE_TIME_TV_MODE (60 * 1000 * 1000)
|
||||||
|
|
||||||
void CNeutrinoApp::SendSectionsdConfig(void)
|
void CNeutrinoApp::MakeSectionsdConfig(CSectionsdClient::epg_config& config)
|
||||||
{
|
{
|
||||||
CSectionsdClient::epg_config config;
|
|
||||||
config.scanMode = scanSettings.scanSectionsd;
|
config.scanMode = scanSettings.scanSectionsd;
|
||||||
config.epg_cache = atoi(g_settings.epg_cache.c_str());
|
config.epg_cache = atoi(g_settings.epg_cache.c_str());
|
||||||
config.epg_old_events = atoi(g_settings.epg_old_events.c_str());
|
config.epg_old_events = atoi(g_settings.epg_old_events.c_str());
|
||||||
@@ -1560,6 +1559,12 @@ void CNeutrinoApp::SendSectionsdConfig(void)
|
|||||||
config.network_ntpserver = g_settings.network_ntpserver;
|
config.network_ntpserver = g_settings.network_ntpserver;
|
||||||
config.network_ntprefresh = atoi(g_settings.network_ntprefresh.c_str());
|
config.network_ntprefresh = atoi(g_settings.network_ntprefresh.c_str());
|
||||||
config.network_ntpenable = g_settings.network_ntpenable;
|
config.network_ntpenable = g_settings.network_ntpenable;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CNeutrinoApp::SendSectionsdConfig(void)
|
||||||
|
{
|
||||||
|
CSectionsdClient::epg_config config;
|
||||||
|
MakeSectionsdConfig(config);
|
||||||
g_Sectionsd->setConfig(config);
|
g_Sectionsd->setConfig(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1568,7 +1573,7 @@ void CNeutrinoApp::InitZapper()
|
|||||||
struct stat my_stat;
|
struct stat my_stat;
|
||||||
|
|
||||||
g_InfoViewer->start();
|
g_InfoViewer->start();
|
||||||
SendSectionsdConfig();
|
//SendSectionsdConfig();
|
||||||
if (g_settings.epg_save){
|
if (g_settings.epg_save){
|
||||||
if(stat(g_settings.epg_dir.c_str(), &my_stat) == 0)
|
if(stat(g_settings.epg_dir.c_str(), &my_stat) == 0)
|
||||||
g_Sectionsd->readSIfromXML(g_settings.epg_dir.c_str());
|
g_Sectionsd->readSIfromXML(g_settings.epg_dir.c_str());
|
||||||
@@ -1719,6 +1724,9 @@ int CNeutrinoApp::run(int argc, char **argv)
|
|||||||
|
|
||||||
#ifndef DISABLE_SECTIONSD
|
#ifndef DISABLE_SECTIONSD
|
||||||
//pthread_create (§ions_thread, NULL, sectionsd_main_thread, (void *) NULL);
|
//pthread_create (§ions_thread, NULL, sectionsd_main_thread, (void *) NULL);
|
||||||
|
CSectionsdClient::epg_config config;
|
||||||
|
MakeSectionsdConfig(config);
|
||||||
|
CEitManager::getInstance()->SetConfig(config);
|
||||||
CEitManager::getInstance()->Start();
|
CEitManager::getInstance()->Start();
|
||||||
#endif
|
#endif
|
||||||
g_Zapit = new CZapitClient;
|
g_Zapit = new CZapitClient;
|
||||||
@@ -1784,8 +1792,8 @@ int CNeutrinoApp::run(int argc, char **argv)
|
|||||||
//init Menues
|
//init Menues
|
||||||
InitMenu();
|
InitMenu();
|
||||||
|
|
||||||
|
#if 0 //ndef DISABLE_SECTIONSD
|
||||||
/* wait for sectionsd to be able to process our registration */
|
/* wait for sectionsd to be able to process our registration */
|
||||||
#ifndef DISABLE_SECTIONSD
|
|
||||||
time_t t = time_monotonic_ms();
|
time_t t = time_monotonic_ms();
|
||||||
while (! sectionsd_isReady())
|
while (! sectionsd_isReady())
|
||||||
sleep(0);
|
sleep(0);
|
||||||
|
Reference in New Issue
Block a user