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();
|
||||
paint();
|
||||
} else {
|
||||
if(CNeutrinoApp::getInstance()->StartPip((*chanlist)[selected]->getChannelID())) {
|
||||
calcSize();
|
||||
paint();
|
||||
}
|
||||
handleMsg(NeutrinoMessages::EVT_PROGRAMLOCKSTATUS, 0x100, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -973,7 +970,7 @@ bool CChannelList::showInfo(int number, int epgpos)
|
||||
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;
|
||||
|
||||
@@ -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())
|
||||
goto out;
|
||||
|
||||
if (pip && (*chanlist)[selected]->Locked() == g_settings.parentallock_defaultlocked)
|
||||
goto out;
|
||||
|
||||
/* OK, let's ask for a PIN */
|
||||
g_RemoteControl->stopvideo();
|
||||
//printf("stopped video\n");
|
||||
if (!pip) {
|
||||
g_RemoteControl->is_video_started = true;
|
||||
g_RemoteControl->stopvideo();
|
||||
//printf("stopped video\n");
|
||||
}
|
||||
zapProtection = new CZapProtection(g_settings.parentallock_pincode, data);
|
||||
|
||||
if (zapProtection->check())
|
||||
@@ -1051,8 +1054,15 @@ int CChannelList::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data)
|
||||
zapProtection = NULL;
|
||||
|
||||
out:
|
||||
if (startvideo)
|
||||
g_RemoteControl->startvideo();
|
||||
if (startvideo) {
|
||||
if(pip) {
|
||||
if (CNeutrinoApp::getInstance()->StartPip((*chanlist)[selected]->getChannelID())) {
|
||||
calcSize();
|
||||
paint();
|
||||
}
|
||||
} else
|
||||
g_RemoteControl->startvideo();
|
||||
}
|
||||
|
||||
return messages_return::handled;
|
||||
}
|
||||
|
Reference in New Issue
Block a user