1 from enigma import eServiceCenter
2 from Components.config import config
5 from EPGSearch import EPGSearch, EPGSearchEPGSelection, searchEvent, pzyP4TInit
8 from Plugins.Plugin import PluginDescriptor
11 def autostart(reason, **kwargs):
14 # for blue and audio key activating in EPG-Screens
21 def main(session, *args, **kwargs):
22 s = session.nav.getCurrentService()
25 event = info.getEvent(0) # 0 = now, 1 = next
26 name = event and event.getEventName() or ''
27 session.open(EPGSearch, name, config.plugins.epgsearch.add_history_onOpen.value)
29 session.open(EPGSearch)
32 def eventinfo(session, *args, **kwargs):
33 ref = session.nav.getCurrentlyPlayingServiceReference()
34 session.open(EPGSearchEPGSelection, ref, True)
37 def movielist(session, service, **kwargs):
38 serviceHandler = eServiceCenter.getInstance()
39 info = serviceHandler.info(service)
40 name = info and info.getName(service) or ''
42 session.open(EPGSearch, name, config.plugins.epgsearch.add_history_onOpen.value)
44 def Plugins(**kwargs):
48 where = [PluginDescriptor.WHERE_EPG_SELECTION_SINGLE_BLUE, PluginDescriptor.WHERE_EVENTVIEW],
52 where = PluginDescriptor.WHERE_AUTOSTART,
58 # TRANSLATORS: description of EPGSearch in PluginBrowser
59 description = _("Search EPG"),
60 where = PluginDescriptor.WHERE_PLUGINMENU,
62 icon = "EPGSearch.png",
66 # TRANSLATORS: EPGSearch title in EventInfo dialog (requires the user to select an event to search for)
67 name = _("search EPG..."),
68 where = PluginDescriptor.WHERE_EVENTINFO,
73 # TRANSLATORS: EPGSearch title in MovieList (does not require further user interaction)
74 description = _("search EPG"),
75 where = PluginDescriptor.WHERE_MOVIELIST,