self.session.openWithCallback(
self.epgClosed,
EPGSearchEPGSelection,
- ref
+ ref,
+ False
)
def epgClosed(self, ret = None):
self.close(ret)
class EPGSearchEPGSelection(EPGSelection):
- def __init__(self, session, ref):
+ def __init__(self, session, ref, openPlugin):
EPGSelection.__init__(self, session, ref)
self.skinName = "EPGSelection"
self["key_green"].setText(_("Search"))
+ self.openPlugin = openPlugin
def infoKeyPressed(self):
self.timerAdd()
if not evt:
return
- self.close(evt.getEventName())
+ if self.openPlugin:
+ self.session.open(
+ EPGSearch,
+ evt.getEventName()
+ )
+ else:
+ self.close(evt.getEventName())
config.plugins.epgsearch.encoding = ConfigText(default = 'ISO8859-15', fixed_size = False)
# Plugin
-from EPGSearch import EPGSearch
+from EPGSearch import EPGSearch, EPGSearchEPGSelection
# Plugin definition
from Plugins.Plugin import PluginDescriptor
session.open(EPGSearch, name)
+# Event Info
+def eventinfo(session, *args, **kwargs):
+ ref = session.nav.getCurrentlyPlayingServiceReference()
+ session.open(EPGSearchEPGSelection, ref, True)
+
def Plugins(**kwargs):
return [
PluginDescriptor(
PluginDescriptor(
name = _("Search EPG..."),
where = PluginDescriptor.WHERE_EVENTINFO,
- fnc = main,
+ fnc = eventinfo,
),
PluginDescriptor(
name = "EPGSearch",