nhttpd: fix switch tv<>radio in standby mode

This commit is contained in:
Jacek Jendrzej
2015-04-02 21:05:51 +02:00
parent 9c4e8b028b
commit 0a97efe317

View File

@@ -332,17 +332,27 @@ void CControlAPI::SetModeCGI(CyhookHandler *hh)
if (hh->ParamList["1"] == "radio") // switch to radio mode if (hh->ParamList["1"] == "radio") // switch to radio mode
{ {
if(CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_standby){
int mode = NeutrinoMessages::mode_radio; int mode = NeutrinoMessages::mode_radio;
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::CHANGEMODE, CEventServer::INITID_HTTPD, (void *)&mode,sizeof(int)); NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::CHANGEMODE, CEventServer::INITID_HTTPD, (void *)&mode,sizeof(int));
sleep(1); sleep(1);
NeutrinoAPI->UpdateBouquets(); NeutrinoAPI->UpdateBouquets();
}else{
extern CRemoteControl * g_RemoteControl;
g_RemoteControl->radioMode();
}
} }
else if (hh->ParamList["1"] == "tv") // switch to tv mode else if (hh->ParamList["1"] == "tv") // switch to tv mode
{ {
if(CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_standby){
int mode = NeutrinoMessages::mode_tv; int mode = NeutrinoMessages::mode_tv;
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::CHANGEMODE, CEventServer::INITID_HTTPD, (void *)&mode,sizeof(int)); NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::CHANGEMODE, CEventServer::INITID_HTTPD, (void *)&mode,sizeof(int));
sleep(1); sleep(1);
NeutrinoAPI->UpdateBouquets(); NeutrinoAPI->UpdateBouquets();
}else{
extern CRemoteControl * g_RemoteControl;
g_RemoteControl->tvMode();
}
} }
else if (hh->ParamList["record"] == "start") // start record mode else if (hh->ParamList["record"] == "start") // start record mode
{ {