[vuplus-wifi-util] fix default ccode
[vuplus_openvuplus_3.0] / meta-openvuplus / recipes-vuplus / e2openplugins / files / openwebif_block_in_qpip.patch
1 diff --git a/plugin/controllers/models/control.py b/plugin/controllers/models/control.py
2 old mode 100644
3 new mode 100755
4 index 1045d44..4a564bb
5 --- a/plugin/controllers/models/control.py
6 +++ b/plugin/controllers/models/control.py
7 @@ -13,6 +13,17 @@ from enigma import eServiceReference, eActionMap, eServiceCenter
8  from urllib import unquote
9  from services import getProtection
10  from Screens.InfoBar import InfoBar, MoviePlayer
11 +import os
12 +
13 +ENABLE_QPIP_PROCPATH = "/proc/stb/video/decodermode"
14 +def checkIsQPiP():
15 +       if os.access(ENABLE_QPIP_PROCPATH, os.F_OK):
16 +               fd = open(ENABLE_QPIP_PROCPATH,"r")
17 +               data = fd.read()
18 +               fd.close()
19 +
20 +               return data.strip() == "mosaic"
21 +       return False
22  
23  def zapInServiceList(service):
24         InfoBar_Instance = InfoBar.instance
25 @@ -60,6 +71,12 @@ def zapInServiceList(service):
26         servicelist.zap()
27  
28  def zapService(session, id, title = ""):
29 +       if checkIsQPiP():
30 +               return {
31 +                       "result": False,
32 +                       "message": "Can not zap service in quad PiP mode."
33 +               }
34 +
35         # Must NOT unquote id here, breaks zap to streams
36         service = eServiceReference(id)
37