mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
neutrino: try to fix parental bypass by
quit from audio player / picture viewer / movie player and starting channel in PiP
This commit is contained in:
@@ -886,10 +886,7 @@ int CChannelList::show()
|
|||||||
calcSize();
|
calcSize();
|
||||||
paint();
|
paint();
|
||||||
} else {
|
} else {
|
||||||
if(CNeutrinoApp::getInstance()->StartPip((*chanlist)[selected]->getChannelID())) {
|
handleMsg(NeutrinoMessages::EVT_PROGRAMLOCKSTATUS, 0x100, true);
|
||||||
calcSize();
|
|
||||||
paint();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -973,7 +970,7 @@ bool CChannelList::showInfo(int number, int epgpos)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CChannelList::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data)
|
int CChannelList::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data, bool pip)
|
||||||
{
|
{
|
||||||
bool startvideo = true;
|
bool startvideo = true;
|
||||||
|
|
||||||
@@ -1014,9 +1011,15 @@ int CChannelList::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data)
|
|||||||
if (data >= 0x100 && (*chanlist)[selected]->last_unlocked_time + g_settings.parentallock_zaptime * 60 > time_monotonic())
|
if (data >= 0x100 && (*chanlist)[selected]->last_unlocked_time + g_settings.parentallock_zaptime * 60 > time_monotonic())
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
if (pip && (*chanlist)[selected]->Locked() == g_settings.parentallock_defaultlocked)
|
||||||
|
goto out;
|
||||||
|
|
||||||
/* OK, let's ask for a PIN */
|
/* OK, let's ask for a PIN */
|
||||||
g_RemoteControl->stopvideo();
|
if (!pip) {
|
||||||
//printf("stopped video\n");
|
g_RemoteControl->is_video_started = true;
|
||||||
|
g_RemoteControl->stopvideo();
|
||||||
|
//printf("stopped video\n");
|
||||||
|
}
|
||||||
zapProtection = new CZapProtection(g_settings.parentallock_pincode, data);
|
zapProtection = new CZapProtection(g_settings.parentallock_pincode, data);
|
||||||
|
|
||||||
if (zapProtection->check())
|
if (zapProtection->check())
|
||||||
@@ -1051,8 +1054,15 @@ int CChannelList::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data)
|
|||||||
zapProtection = NULL;
|
zapProtection = NULL;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (startvideo)
|
if (startvideo) {
|
||||||
g_RemoteControl->startvideo();
|
if(pip) {
|
||||||
|
if (CNeutrinoApp::getInstance()->StartPip((*chanlist)[selected]->getChannelID())) {
|
||||||
|
calcSize();
|
||||||
|
paint();
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
g_RemoteControl->startvideo();
|
||||||
|
}
|
||||||
|
|
||||||
return messages_return::handled;
|
return messages_return::handled;
|
||||||
}
|
}
|
||||||
|
@@ -210,7 +210,7 @@ public:
|
|||||||
int hasChannelID(t_channel_id channel_id);
|
int hasChannelID(t_channel_id channel_id);
|
||||||
void setSelected( int nChannelNr); // for adjusting bouquet's channel list after numzap or quickzap
|
void setSelected( int nChannelNr); // for adjusting bouquet's channel list after numzap or quickzap
|
||||||
|
|
||||||
int handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data);
|
int handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data, bool pip = false);
|
||||||
|
|
||||||
int getSize() const;
|
int getSize() const;
|
||||||
bool isEmpty() const;
|
bool isEmpty() const;
|
||||||
|
@@ -179,8 +179,10 @@ void CMoviePlayerGui::cutNeutrino()
|
|||||||
if (!isWebTV)
|
if (!isWebTV)
|
||||||
g_Sectionsd->setPauseScanning(true);
|
g_Sectionsd->setPauseScanning(true);
|
||||||
|
|
||||||
m_LastMode = (CNeutrinoApp::getInstance()->getMode() | NeutrinoMessages::norezap);
|
m_LastMode = (CNeutrinoApp::getInstance()->getMode() /*| NeutrinoMessages::norezap*/);
|
||||||
printf("%s: save mode %d\n", __func__, m_LastMode & NeutrinoMessages::mode_mask);fflush(stdout);
|
if (isWebTV)
|
||||||
|
m_LastMode |= NeutrinoMessages::norezap;
|
||||||
|
printf("%s: save mode %x\n", __func__, m_LastMode);fflush(stdout);
|
||||||
int new_mode = NeutrinoMessages::norezap | (isWebTV ? NeutrinoMessages::mode_webtv : NeutrinoMessages::mode_ts);
|
int new_mode = NeutrinoMessages::norezap | (isWebTV ? NeutrinoMessages::mode_webtv : NeutrinoMessages::mode_ts);
|
||||||
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, new_mode);
|
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, new_mode);
|
||||||
}
|
}
|
||||||
@@ -199,10 +201,11 @@ void CMoviePlayerGui::restoreNeutrino()
|
|||||||
g_Zapit->unlockPlayBack();
|
g_Zapit->unlockPlayBack();
|
||||||
g_Sectionsd->setPauseScanning(false);
|
g_Sectionsd->setPauseScanning(false);
|
||||||
|
|
||||||
printf("%s: restore mode %d\n", __func__, m_LastMode & NeutrinoMessages::mode_mask);fflush(stdout);
|
printf("%s: restore mode %x\n", __func__, m_LastMode);fflush(stdout);
|
||||||
|
#if 0
|
||||||
if (m_LastMode == NeutrinoMessages::mode_tv)
|
if (m_LastMode == NeutrinoMessages::mode_tv)
|
||||||
g_RCInput->postMsg(NeutrinoMessages::EVT_PROGRAMLOCKSTATUS, 0x200, false);
|
g_RCInput->postMsg(NeutrinoMessages::EVT_PROGRAMLOCKSTATUS, 0x200, false);
|
||||||
|
#endif
|
||||||
if (m_LastMode != NeutrinoMessages::mode_unknown)
|
if (m_LastMode != NeutrinoMessages::mode_unknown)
|
||||||
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, m_LastMode);
|
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, m_LastMode);
|
||||||
|
|
||||||
@@ -213,7 +216,7 @@ printf("%s: restore mode %d\n", __func__, m_LastMode & NeutrinoMessages::mode_ma
|
|||||||
CZapit::getInstance()->Rezap();
|
CZapit::getInstance()->Rezap();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
printf("%s: restoring done.\n", __func__);fflush(stdout);
|
printf("%s: restoring done.\n", __func__);fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey)
|
int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey)
|
||||||
|
@@ -3745,8 +3745,10 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey)
|
|||||||
CMoviePlayerGui::getInstance().exec(NULL, actionKey);
|
CMoviePlayerGui::getInstance().exec(NULL, actionKey);
|
||||||
if(_mode == NeutrinoMessages::mode_radio )
|
if(_mode == NeutrinoMessages::mode_radio )
|
||||||
videoDecoder->ShowPicture(DATADIR "/neutrino/icons/radiomode.jpg");
|
videoDecoder->ShowPicture(DATADIR "/neutrino/icons/radiomode.jpg");
|
||||||
|
#if 0
|
||||||
else if (_mode == mode_webtv)
|
else if (_mode == mode_webtv)
|
||||||
tvMode(true);
|
tvMode(true);
|
||||||
|
#endif
|
||||||
return menu_return::RETURN_EXIT_ALL;
|
return menu_return::RETURN_EXIT_ALL;
|
||||||
}
|
}
|
||||||
else if(actionKey=="audioplayer" || actionKey == "inetplayer") {
|
else if(actionKey=="audioplayer" || actionKey == "inetplayer") {
|
||||||
|
Reference in New Issue
Block a user