1 # for localized messages
4 from enigma import eServiceCenter
7 from Components.config import config, ConfigSet, ConfigSubsection, ConfigText
9 config.plugins.epgsearch = ConfigSubsection()
10 config.plugins.epgsearch.history = ConfigSet(choices = [])
11 # XXX: configtext is more flexible but we cannot use this for a (not yet created) gui config
12 config.plugins.epgsearch.encoding = ConfigText(default = 'ISO8859-15', fixed_size = False)
15 from EPGSearch import EPGSearch, EPGSearchEPGSelection, EPGSelectionInit
18 from Plugins.Plugin import PluginDescriptor
21 def autostart(reason, **kwargs):
22 if "session" in kwargs:
24 # for blue key activating in EPGSelection
30 def main(session, *args, **kwargs):
31 s = session.nav.getCurrentService()
33 event = info.getEvent(0) # 0 = now, 1 = next
34 name = event and event.getEventName() or ''
35 session.open(EPGSearch, name, False)
38 def eventinfo(session, *args, **kwargs):
39 ref = session.nav.getCurrentlyPlayingServiceReference()
40 session.open(EPGSearchEPGSelection, ref, True)
43 def movielist(session, service, **kwargs):
44 serviceHandler = eServiceCenter.getInstance()
45 info = serviceHandler.info(service)
46 name = info and info.getName(service) or ''
48 session.open(EPGSearch, name)
50 def Plugins(**kwargs):
53 where = PluginDescriptor.WHERE_SESSIONSTART,
58 description = _("Search EPG"),
59 where = PluginDescriptor.WHERE_PLUGINMENU,
63 name = _("search EPG..."),
64 where = PluginDescriptor.WHERE_EVENTINFO,
69 description = _("search EPG..."),
70 where = PluginDescriptor.WHERE_MOVIELIST,