aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2011-09-13 10:50:43 +0200
committerghost <andreas.monzner@multimedia-labs.de>2011-09-13 10:50:43 +0200
commit804ad88e6679853bd2db717fc542263d48075631 (patch)
tree87e2fb5558b79ef89154176f5efdda3921ee8f03 /lib/python/Plugins
parent64d399c3d183fa3f7d02fb73e474e42583538def (diff)
parent005321304bec7f71e748db3173d411f5684642e2 (diff)
downloadenigma2-804ad88e6679853bd2db717fc542263d48075631.tar.gz
enigma2-804ad88e6679853bd2db717fc542263d48075631.zip
Merge remote-tracking branch 'origin/bug_453_multiepg_no_more_ask_bouquet'
Diffstat (limited to 'lib/python/Plugins')
-rw-r--r--lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py40
1 files changed, 32 insertions, 8 deletions
diff --git a/lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py b/lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py
index bcc7b9b2..af14578a 100644
--- a/lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py
+++ b/lib/python/Plugins/Extensions/GraphMultiEPG/plugin.py
@@ -1,8 +1,9 @@
from Plugins.Plugin import PluginDescriptor
from GraphMultiEpg import GraphMultiEPG
-from Screens.ChannelSelection import BouquetSelector
+from Screens.ChannelSelection import BouquetSelector, SilentBouquetSelector
from enigma import eServiceCenter, eServiceReference
from ServiceReference import ServiceReference
+from Components.config import config
Session = None
Servicelist = None
@@ -73,6 +74,32 @@ def changeBouquetCB(direction, epg):
epg_bouquet = bouquet
epg.setServices(services)
+def openAskBouquet(Session, bouquets, cnt):
+ if cnt > 1: # show bouquet list
+ global bouquetSel
+ bouquetSel = Session.openWithCallback(closed, BouquetSelector, bouquets, openBouquetEPG, enableWrapAround=True)
+ dlg_stack.append(bouquetSel)
+ elif cnt == 1:
+ if not openBouquetEPG(bouquets[0][1]):
+ cleanup()
+
+def openSilent(Servicelist, bouquets, cnt):
+ root = Servicelist.getRoot()
+ if cnt > 1: # create bouquet list
+ global bouquetSel
+ current = 0
+ rootstr = root.toCompareString()
+ for bouquet in bouquets:
+ if bouquet[1].toCompareString() == rootstr:
+ break
+ current += 1
+ if current >= cnt:
+ current = 0
+ bouquetSel = SilentBouquetSelector(bouquets, True, current)
+ if cnt >= 1: # open current bouquet
+ if not openBouquetEPG(root):
+ cleanup()
+
def main(session, servicelist, **kwargs):
global Session
Session = session
@@ -83,13 +110,10 @@ def main(session, servicelist, **kwargs):
cnt = 0
else:
cnt = len(bouquets)
- if cnt > 1: # show bouquet list
- global bouquetSel
- bouquetSel = Session.openWithCallback(closed, BouquetSelector, bouquets, openBouquetEPG, enableWrapAround=True)
- dlg_stack.append(bouquetSel)
- elif cnt == 1:
- if not openBouquetEPG(bouquets[0][1]):
- cleanup()
+ if config.usage.multiepg_ask_bouquet.value:
+ openAskBouquet(session, bouquets, cnt)
+ else:
+ openSilent(servicelist, bouquets, cnt)
def Plugins(**kwargs):
name = _("Graphical Multi EPG")