summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/WindowsPhoneNotify.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hooks/WindowsPhoneNotify.py')
-rw-r--r--module/plugins/hooks/WindowsPhoneNotify.py25
1 files changed, 22 insertions, 3 deletions
diff --git a/module/plugins/hooks/WindowsPhoneNotify.py b/module/plugins/hooks/WindowsPhoneNotify.py
index a1068ead5..d8215f9fe 100644
--- a/module/plugins/hooks/WindowsPhoneNotify.py
+++ b/module/plugins/hooks/WindowsPhoneNotify.py
@@ -9,13 +9,15 @@ from module.plugins.Hook import Hook, Expose
class WindowsPhoneNotify(Hook):
__name__ = "WindowsPhoneNotify"
__type__ = "hook"
- __version__ = "0.08"
+ __version__ = "0.09"
__config__ = [("id" , "str" , "Push ID" , "" ),
("url" , "str" , "Push url" , "" ),
("notifycaptcha" , "bool", "Notify captcha request" , True ),
("notifypackage" , "bool", "Notify package finished" , True ),
- ("notifyprocessed", "bool", "Notify status of processed packages" , True ),
+ ("notifyprocessed", "bool", "Notify packages processed" , True ),
+ ("notifyupdate" , "bool", "Notify plugin updates" , True ),
+ ("notifyexit" , "bool", "Notify pyLoad shutdown" , True ),
("sendtimewait" , "int" , "Timewait in seconds between notifications", 5 ),
("sendpermin" , "int" , "Max notifications per minute" , 12 ),
("ignoreclient" , "bool", "Send notifications if client is connected", False)]
@@ -26,7 +28,7 @@ class WindowsPhoneNotify(Hook):
("Walter Purcaro", "vuolter@gmail.com" )]
- event_list = ["allDownloadsProcessed"]
+ event_list = ["allDownloadsProcessed", "plugin_updated"]
#@TODO: Remove in 0.4.10
@@ -40,6 +42,23 @@ class WindowsPhoneNotify(Hook):
self.notifications = 0
+ def plugin_updated(self, type_plugins):
+ if not self.getConfig('notifyupdate'):
+ return
+
+ self.notify(_("Plugins updated"), str(type_plugins))
+
+
+ def coreExiting(self):
+ if not self.getConfig('notifyexit'):
+ return
+
+ if self.core.do_restart:
+ self.notify(_("Restarting pyLoad"))
+ else:
+ self.notify(_("Exiting pyLoad"))
+
+
def newCaptchaTask(self, task):
if not self.getConfig('notifycaptcha'):
return