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
15 from Plugins.Plugin import PluginDescriptor
18 def main(session, *args, **kwargs):
19 session.open(EPGSearch)
22 def movielist(session, service, **kwargs):
23 serviceHandler = eServiceCenter.getInstance()
24 info = serviceHandler.info(service)
25 name = info and info.getName(service) or ''
27 session.open(EPGSearch, name)
30 def eventinfo(session, servicelist, **kwargs):
31 s = session.nav.getCurrentService()
33 event = info.getEvent(0) # 0 = now, 1 = next
34 name = event and event.getEventName() or ''
36 session.open(EPGSearch, name)
38 def Plugins(**kwargs):
42 description = _("Search EPG"),
43 where = PluginDescriptor.WHERE_PLUGINMENU,
47 name = _("Search EPG"),
48 where = PluginDescriptor.WHERE_EVENTINFO,
53 description = _("Search EPG"),
54 where = PluginDescriptor.WHERE_MOVIELIST,