mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 15:02:56 +02:00
add frequently reload xmltv epg
This commit is contained in:
@@ -84,7 +84,8 @@ class CSectionsdClient : private CBasicClient
|
||||
EVT_SERVICES_UPDATE,
|
||||
EVT_BOUQUETS_UPDATE,
|
||||
#endif
|
||||
EVT_WRITE_SI_FINISHED
|
||||
EVT_WRITE_SI_FINISHED,
|
||||
EVT_RELOAD_XMLTV
|
||||
};
|
||||
|
||||
struct epgflags {
|
||||
|
@@ -1033,6 +1033,10 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6
|
||||
case CSectionsdClient::EVT_BOUQUETS_UPDATE:
|
||||
break;
|
||||
#endif
|
||||
case CSectionsdClient::EVT_RELOAD_XMLTV:
|
||||
*msg = NeutrinoMessages::EVT_RELOAD_XMLTV;
|
||||
*data = 0;
|
||||
break;
|
||||
default:
|
||||
printf("[neutrino] event INITID_SECTIONSD - unknown eventID 0x%x\n", emsg.eventID );
|
||||
}
|
||||
|
@@ -2213,6 +2213,8 @@ static void *houseKeepingThread(void *)
|
||||
perror("sectionsd: pthread_create()");
|
||||
}
|
||||
pthread_attr_destroy(&attr);
|
||||
|
||||
eventServer->sendEvent(CSectionsdClient::EVT_RELOAD_XMLTV, CEventServer::INITID_SECTIONSD);
|
||||
}
|
||||
ecount = 0;
|
||||
}
|
||||
|
@@ -2876,6 +2876,7 @@ void CNeutrinoApp::InitSectiondClient()
|
||||
g_Sectionsd->registerEvent(CSectionsdClient::EVT_GOT_CN_EPG, 222, NEUTRINO_UDS_NAME);
|
||||
g_Sectionsd->registerEvent(CSectionsdClient::EVT_EIT_COMPLETE, 222, NEUTRINO_UDS_NAME);
|
||||
g_Sectionsd->registerEvent(CSectionsdClient::EVT_WRITE_SI_FINISHED, 222, NEUTRINO_UDS_NAME);
|
||||
g_Sectionsd->registerEvent(CSectionsdClient::EVT_RELOAD_XMLTV, 222, NEUTRINO_UDS_NAME);
|
||||
}
|
||||
|
||||
#if HAVE_CST_HARDWARE
|
||||
@@ -4662,6 +4663,14 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
|
||||
g_volume->setVolumeExt((int)data);
|
||||
return messages_return::handled;
|
||||
}
|
||||
else if (msg == NeutrinoMessages::EVT_RELOAD_XMLTV) {
|
||||
for (std::list<std::string>::iterator it = g_settings.xmltv_xml.begin(); it != g_settings.xmltv_xml.end(); ++it)
|
||||
{
|
||||
printf("CNeutrinoApp::handleMsg: Reading xmltv epg from %s ...\n", (*it).c_str());
|
||||
g_Sectionsd->readSIfromXMLTV((*it).c_str());
|
||||
}
|
||||
return messages_return::handled;
|
||||
}
|
||||
if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000)) {
|
||||
INFO("###################################### DELETED msg %lx data %lx\n", msg, data);
|
||||
delete [] (unsigned char*) data;
|
||||
|
@@ -124,6 +124,9 @@ struct NeutrinoMessages {
|
||||
EVT_CA_MESSAGE = CRCInput::RC_Events + 60, /* data = CA_MESSAGE pointer */
|
||||
EVT_SUBT_MESSAGE = CRCInput::RC_Events + 61, /* data = subtitles pointer */
|
||||
EVT_AUTO_SET_VIDEOSYSTEM = CRCInput::RC_Events + 62, /* data = new video system */
|
||||
|
||||
/* sectionsd */
|
||||
EVT_RELOAD_XMLTV = CRCInput::RC_Events + 63,
|
||||
/* END */
|
||||
|
||||
EVT_CURRENTEPG = CRCInput::RC_WithData + 1,
|
||||
|
Reference in New Issue
Block a user