summaryrefslogtreecommitdiff
path: root/quickbutton
diff options
context:
space:
mode:
authorDr.Best <dr_best@users.schwerkraft.elitedvb.net>2010-02-27 21:26:39 (GMT)
committerDr.Best <dr_best@users.schwerkraft.elitedvb.net>2010-02-27 21:26:39 (GMT)
commit512fe42aa1ddb0acf7e30d0652c383c676f537e6 (patch)
tree9e282932688c275775b7184b128337cc3c8485e2 /quickbutton
parentb47c85b6611a395c90507bc928f337ca13289450 (diff)
There is no need to overwrite runPlugin method, use original method from InfoBarPlugins (so no one can blame this plugin for crashing anymore, when starting a plugin that needs the unavailable servicelist in pvr-mode)
Diffstat (limited to 'quickbutton')
-rw-r--r--quickbutton/src/plugin.py19
1 files changed, 4 insertions, 15 deletions
diff --git a/quickbutton/src/plugin.py b/quickbutton/src/plugin.py
index d29091e..74e31b2 100644
--- a/quickbutton/src/plugin.py
+++ b/quickbutton/src/plugin.py
@@ -42,21 +42,15 @@ config.plugins.Quickbutton.blue = ConfigText(default = _("Nothing"), visible_wid
from Screens.InfoBarGenerics import InfoBarPlugins
baseInfoBarPlugins__init__ = None
-baserunPlugin = None
-StartOnlyOneTime = False
DM8000 = False
-
def autostart(reason, **kwargs):
- global baseInfoBarPlugins__init__, baserunPlugin, DM8000
+ global baseInfoBarPlugins__init__,DM8000
if "session" in kwargs:
session = kwargs["session"]
if baseInfoBarPlugins__init__ is None:
baseInfoBarPlugins__init__ = InfoBarPlugins.__init__
- if baserunPlugin is None:
- baserunPlugin = InfoBarPlugins.runPlugin
InfoBarPlugins.__init__ = InfoBarPlugins__init__
- InfoBarPlugins.runPlugin = runPlugin
InfoBarPlugins.greenlong = greenlong
InfoBarPlugins.yellowlong = yellowlong
InfoBarPlugins.redlong = redlong
@@ -75,9 +69,8 @@ def Plugins(**kwargs):
return list
def InfoBarPlugins__init__(self):
- global StartOnlyOneTime
- if not StartOnlyOneTime:
- StartOnlyOneTime = True
+ from Screens.InfoBarGenerics import InfoBarEPG
+ if isinstance(self, InfoBarEPG):
x = { "green_l": (self.greenlong, _("Assign plugin to long green key pressed")),
"yellow_l": (self.yellowlong, _("Assign plugin to long yellow key pressed")),
"red_l": (self.redlong, _("Assign plugin to long red key pressed")),
@@ -87,7 +80,6 @@ def InfoBarPlugins__init__(self):
self["QuickbuttonActions"] = HelpableActionMap(self, "QuickbuttonActions",x)
else:
InfoBarPlugins.__init__ = InfoBarPlugins.__init__
- InfoBarPlugins.runPlugin = InfoBarPlugins.runPlugin
InfoBarPlugins.greenlong = None
InfoBarPlugins.yellowlong = None
InfoBarPlugins.redlong = None
@@ -96,9 +88,6 @@ def InfoBarPlugins__init__(self):
InfoBarPlugins.red = None
baseInfoBarPlugins__init__(self)
-def runPlugin(self, plugin):
- baserunPlugin(self,plugin)
-
def greenlong(self):
startPlugin(self,str(config.plugins.Quickbutton.green.value))
@@ -159,7 +148,7 @@ def startPlugin(self,pname):
plugin = p
if plugin is not None:
try:
- runPlugin(self,plugin)
+ self.runPlugin(plugin)
no_plugin = False
except Exception, e:
msgText = _("Error!\nError Text: %s"%e)