<item level="2" text="Load Length of Movies in Movielist">config.usage.load_length_of_movies_in_moviellist</item>
<item level="1" text="Show positioner movement">config.usage.showdish</item>
<item level="1" text="Enable multiple bouquets">config.usage.multibouquet</item>
+ <item level="1" text="Multi-EPG bouquet selection">config.usage.multiepg_ask_bouquet</item>
<item level="1" text="Change bouquets in quickzap">config.usage.quickzap_bouquet_change</item>
<item level="1" text="Alternative radio mode">config.usage.e1like_radio_mode</item>
<item level="1" text="Action on long powerbutton press">config.usage.on_long_powerpress</item>
config.usage = ConfigSubsection();
config.usage.showdish = ConfigYesNo(default = True)
config.usage.multibouquet = ConfigYesNo(default = False)
+ config.usage.multiepg_ask_bouquet = ConfigYesNo(default = False)
+
config.usage.quickzap_bouquet_change = ConfigYesNo(default = False)
config.usage.e1like_radio_mode = ConfigYesNo(default = False)
config.usage.infobar_timeout = ConfigSelection(default = "5", choices = [
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
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
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")
def cancelClick(self):
self.close(False)
+class SilentBouquetSelector:
+ def __init__(self, bouquets, enableWrapAround=False, current=0):
+ self.bouquets = [b[1] for b in bouquets]
+ self.pos = current
+ self.count = len(bouquets)
+ self.enableWrapAround = enableWrapAround
+
+ def up(self):
+ if self.pos > 0 or self.enableWrapAround:
+ self.pos = (self.pos - 1) % self.count
+
+ def down(self):
+ if self.pos < (self.count - 1) or self.enableWrapAround:
+ self.pos = (self.pos + 1) % self.count
+
+ def getCurrent(self):
+ return self.bouquets[self.pos]
+
# csel.bouquet_mark_edit values
OFF = 0
EDIT_BOUQUET = 1
-from ChannelSelection import ChannelSelection, BouquetSelector
+from ChannelSelection import ChannelSelection, BouquetSelector, SilentBouquetSelector
from Components.ActionMap import ActionMap, HelpableActionMap
from Components.ActionMap import NumberActionMap
cnt = 0
else:
cnt = len(bouquets)
+ if config.usage.multiepg_ask_bouquet.value:
+ self.openMultiServiceEPGAskBouquet(bouquets, cnt, withCallback)
+ else:
+ self.openMultiServiceEPGSilent(bouquets, cnt, withCallback)
+
+ def openMultiServiceEPGAskBouquet(self, bouquets, cnt, withCallback):
if cnt > 1: # show bouquet list
if withCallback:
self.bouquetSel = self.session.openWithCallback(self.closed, BouquetSelector, bouquets, self.openBouquetEPG, enableWrapAround=True)
elif cnt == 1:
self.openBouquetEPG(bouquets[0][1], withCallback)
+ def openMultiServiceEPGSilent(self, bouquets, cnt, withCallback):
+ root = self.servicelist.getRoot()
+ rootstr = root.toCompareString()
+ current = 0
+ for bouquet in bouquets:
+ if bouquet[1].toCompareString() == rootstr:
+ break
+ current += 1
+ if current >= cnt:
+ current = 0
+ if cnt > 1: # create bouquet list for bouq+/-
+ self.bouquetSel = SilentBouquetSelector(bouquets, True, self.servicelist.getBouquetNumOffset(root))
+ if cnt >= 1:
+ self.openBouquetEPG(root, withCallback)
+
def changeServiceCB(self, direction, epg):
if self.serviceSel:
if direction > 0: