1 from enigma import eServiceCenter
4 from Components.config import config, ConfigSet, ConfigSubsection, ConfigText
6 config.plugins.epgsearch = ConfigSubsection()
7 config.plugins.epgsearch.history = ConfigSet(choices = [])
8 # XXX: configtext is more flexible but we cannot use this for a (not yet created) gui config
9 config.plugins.epgsearch.encoding = ConfigText(default = 'ISO8859-15', fixed_size = False)
12 from EPGSearch import EPGSearch, EPGSearchEPGSelection, EPGSelectionInit
15 from Plugins.Plugin import PluginDescriptor
18 def main(session, *args, **kwargs):
19 s = session.nav.getCurrentService()
21 event = info.getEvent(0) # 0 = now, 1 = next
22 name = event and event.getEventName() or ''
23 session.open(EPGSearch, name, False)
26 def movielist(session, service, **kwargs):
27 serviceHandler = eServiceCenter.getInstance()
28 info = serviceHandler.info(service)
29 name = info and info.getName(service) or ''
31 session.open(EPGSearch, name)
34 def autostart(reason, **kwargs):
35 if "session" in kwargs:
36 session = kwargs["session"]
38 EPGSelectionInit() # for blue key activating in EPGSelection
42 def Plugins(**kwargs):
45 where = PluginDescriptor.WHERE_SESSIONSTART,
50 description = _("Search EPG"),
51 where = PluginDescriptor.WHERE_PLUGINMENU,
55 name = _("Search EPG..."),
56 where = PluginDescriptor.WHERE_EVENTINFO,
61 description = _("Search EPG..."),
62 where = PluginDescriptor.WHERE_MOVIELIST,