git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
patch by Moritz Venn: allow plugins to provide a Wakeup-Time
[enigma2.git]
/
lib
/
python
/
Plugins
/
Plugin.py
diff --git
a/lib/python/Plugins/Plugin.py
b/lib/python/Plugins/Plugin.py
index f6f9b4818a2836966617c8efaa2f61b9760ebe46..583c9ad8486687f874587ff00c6e66dfc15eb86f 100644
(file)
--- a/
lib/python/Plugins/Plugin.py
+++ b/
lib/python/Plugins/Plugin.py
@@
-45,7
+45,7
@@
class PluginDescriptor:
# or return a function which is called with session and the interface name for extended setup of this interface
WHERE_NETWORKSETUP = 10
# or return a function which is called with session and the interface name for extended setup of this interface
WHERE_NETWORKSETUP = 10
- def __init__(self, name = "Plugin", where = [ ], description = "", icon = None, fnc = None):
+ def __init__(self, name = "Plugin", where = [ ], description = "", icon = None, fnc = None
, wakeupfnc = None
):
self.name = name
if type(where) is list:
self.where = where
self.name = name
if type(where) is list:
self.where = where
@@
-59,6
+59,8
@@
class PluginDescriptor:
else:
self.icon = icon
else:
self.icon = icon
+ self.wakeupfnc = wakeupfnc
+
self.__call__ = fnc
def updateIcon(self, path):
self.__call__ = fnc
def updateIcon(self, path):
@@
-67,5
+69,8
@@
class PluginDescriptor:
else:
self.icon = None
else:
self.icon = None
+ def getWakeupTime(self):
+ return self.wakeupfnc and self.wakeupfnc() or -1
+
def __eq__(self, other):
return self.__call__ == other.__call__
def __eq__(self, other):
return self.__call__ == other.__call__