diff options
author | Steven Kosyra <steven.kosyra@googlemail.com> | 2015-01-11 15:04:07 +0100 |
---|---|---|
committer | Steven Kosyra <steven.kosyra@googlemail.com> | 2015-01-11 15:04:07 +0100 |
commit | 2b9e1237bed5866d0349a420d7d806fad75400c6 (patch) | |
tree | 2df79a4089cb97168180da5d9d52801e12dfde2b /module/plugins/hooks/AndroidPhoneNotify.py | |
parent | Code improvements (diff) | |
download | pyload-2b9e1237bed5866d0349a420d7d806fad75400c6.tar.xz |
AndroidPhoneNotify added
Diffstat (limited to 'module/plugins/hooks/AndroidPhoneNotify.py')
-rw-r--r-- | module/plugins/hooks/AndroidPhoneNotify.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/module/plugins/hooks/AndroidPhoneNotify.py b/module/plugins/hooks/AndroidPhoneNotify.py new file mode 100644 index 000000000..d6bf64db4 --- /dev/null +++ b/module/plugins/hooks/AndroidPhoneNotify.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- + + +from module.plugins.Hook import Hook +from module.network.RequestFactory import getURL + +class AndroidPhoneNotify(Hook): + __name__ = "AndroidPhoneNotify" + __type__ = "hook" + __version__ = "0.01" + + __config__ = [("apikey", "str", "apikey", ""), + ("appname", "str", "ApplicationName", "pyLoad"), + ("notifycaptcha", "bool", "Send captcha notifications (maybe usefull if premium fails)", False)] + + __description__ = """Send push notifications to your Android Phone using notifymyandroid.com""" + __license__ = "GPLv3" + __authors__ = [("Steven Kosyra", "steven.kosyra@gmail.com")] + + + def packageFinished(self, pypack): + self.genUrl("Package finished:",pypack.name) + + + def newCaptchaTask(self, task): + if self.getConfig("notifycaptcha"): + self.genUrl("Captcha","new Captcha request") + + + + def genUrl(self,event, msg): + self.response(event, msg) + + + + def response(self, event, msg): + html = getURL("http://www.notifymyandroid.com/publicapi/notify?apikey=" + self.getConfig("apikey") + "&application=" + self.getConfig("appname") + "&event=" + str(event) + "&description= " + str(msg) + "") |