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
18 from Plugins.Plugin import PluginDescriptor
21 def main(session, *args, **kwargs):
22 s = session.nav.getCurrentService()
24 event = info.getEvent(0) # 0 = now, 1 = next
25 name = event and event.getEventName() or ''
26 session.open(EPGSearch, name, False)
29 def movielist(session, service, **kwargs):
30 serviceHandler = eServiceCenter.getInstance()
31 info = serviceHandler.info(service)
32 name = info and info.getName(service) or ''
34 session.open(EPGSearch, name)
36 def Plugins(**kwargs):
40 description = _("Search EPG"),
41 where = PluginDescriptor.WHERE_PLUGINMENU,
45 name = _("Search EPG..."),
46 where = PluginDescriptor.WHERE_EVENTINFO,
51 description = _("Search EPG..."),
52 where = PluginDescriptor.WHERE_MOVIELIST,