add frequently reload xmltv epg

Origin commit data
------------------
Branch: ni/coolstream
Commit: 852130e9cd
Author: TangoCash <eric@loxat.de>
Date: 2021-09-02 (Thu, 02 Sep 2021)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
TangoCash
2021-09-02 20:51:30 +02:00
committed by vanhofen
parent 4ec3f75d0d
commit cdbe3bce26
5 changed files with 20 additions and 1 deletions

View File

@@ -2921,6 +2921,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
@@ -4720,6 +4721,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;