- controlaip: add possibility to reload channellists

This commit is contained in:
svenhoefer
2015-10-21 19:38:35 +02:00
parent 245f866883
commit 2a63ddaeb9
3 changed files with 25 additions and 0 deletions

View File

@@ -182,6 +182,7 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]=
{"version", &CControlAPI::VersionCGI, ""},
{"reloadsetup", &CControlAPI::ReloadNeutrinoSetupCGI, ""},
{"reloadplugins", &CControlAPI::ReloadPluginsCGI, ""},
{"reloadchannels", &CControlAPI::ReloadChannelsCGI, ""},
{"screenshot", &CControlAPI::ScreenshotCGI, ""},
// boxcontrol - devices
{"volume", &CControlAPI::VolumeCGI, "text/plain"},
@@ -1657,6 +1658,14 @@ void CControlAPI::ReloadPluginsCGI(CyhookHandler *hh)
hh->SendOk();
}
void CControlAPI::ReloadChannelsCGI(CyhookHandler *hh)
{
CServiceManager::getInstance()->SaveServices(true, true);
NeutrinoAPI->Zapit->reinitChannels();
CNeutrinoApp::getInstance()->SDTreloadChannels = false;
hh->SendOk();
}
void CControlAPI::ScreenshotCGI(CyhookHandler *hh)
{
bool enableOSD = true;