From 48c0c42fd6faffc56432d5f037cd575979f180cc Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 14 Jul 2014 02:23:37 +0200 Subject: Removed all @author flags + key attributes cleanup for internal & hooks plugins --- module/plugins/hooks/WindowsPhoneToastNotify.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'module/plugins/hooks/WindowsPhoneToastNotify.py') diff --git a/module/plugins/hooks/WindowsPhoneToastNotify.py b/module/plugins/hooks/WindowsPhoneToastNotify.py index 7c005fcbb..25fa3abe5 100644 --- a/module/plugins/hooks/WindowsPhoneToastNotify.py +++ b/module/plugins/hooks/WindowsPhoneToastNotify.py @@ -13,8 +13,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, see . - - @author: RaNaN, Godofdream, zoidberg """ import time import httplib @@ -24,15 +22,19 @@ from module.plugins.Hook import Hook class WindowsPhoneToastNotify(Hook): __name__ = "WindowsPhoneToastNotify" __version__ = "0.02" - __description__ = """Send push notifications to Windows Phone""" - __author_name__ = "Andy Voigt" - __author_mail__ = "phone-support@hotmail.de" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("force", "bool", "Force even if client is connected", False), ("pushId", "str", "pushId", ""), ("pushUrl", "str", "pushUrl", ""), ("pushTimeout", "int", "Timeout between notifications in seconds", 0)] + __description__ = """Send push notifications to Windows Phone""" + __author_name__ = "Andy Voigt" + __author_mail__ = "phone-support@hotmail.de" + + def setup(self): self.info = {} -- cgit v1.2.3 From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 Aug 2014 19:35:59 +0200 Subject: Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics --- module/plugins/hooks/WindowsPhoneToastNotify.py | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'module/plugins/hooks/WindowsPhoneToastNotify.py') diff --git a/module/plugins/hooks/WindowsPhoneToastNotify.py b/module/plugins/hooks/WindowsPhoneToastNotify.py index 25fa3abe5..01570b966 100644 --- a/module/plugins/hooks/WindowsPhoneToastNotify.py +++ b/module/plugins/hooks/WindowsPhoneToastNotify.py @@ -1,28 +1,15 @@ # -*- coding: utf-8 -*- -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . -""" -import time import httplib +import time + from module.plugins.Hook import Hook class WindowsPhoneToastNotify(Hook): __name__ = "WindowsPhoneToastNotify" - __version__ = "0.02" __type__ = "hook" + __version__ = "0.02" __config__ = [("activated", "bool", "Activated", False), ("force", "bool", "Force even if client is connected", False), -- cgit v1.2.3 From b0868ae6446078bacf1635dde5e4ab316b4a94cb Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Oct 2014 18:57:59 +0200 Subject: New __authors__ key replaces __author_name__ and __author_mail__ + Whitespaces and EOF fixup --- module/plugins/hooks/WindowsPhoneToastNotify.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/hooks/WindowsPhoneToastNotify.py') diff --git a/module/plugins/hooks/WindowsPhoneToastNotify.py b/module/plugins/hooks/WindowsPhoneToastNotify.py index 01570b966..bf18d01c0 100644 --- a/module/plugins/hooks/WindowsPhoneToastNotify.py +++ b/module/plugins/hooks/WindowsPhoneToastNotify.py @@ -18,8 +18,7 @@ class WindowsPhoneToastNotify(Hook): ("pushTimeout", "int", "Timeout between notifications in seconds", 0)] __description__ = """Send push notifications to Windows Phone""" - __author_name__ = "Andy Voigt" - __author_mail__ = "phone-support@hotmail.de" + __authors__ = [("Andy Voigt", "phone-support@hotmail.de")] def setup(self): -- cgit v1.2.3 From ae7a7e66981456e5bbe2b54006d79b6f907be7a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Oct 2014 20:18:13 +0200 Subject: Add __license__ key attribute to plugins --- module/plugins/hooks/WindowsPhoneToastNotify.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hooks/WindowsPhoneToastNotify.py') diff --git a/module/plugins/hooks/WindowsPhoneToastNotify.py b/module/plugins/hooks/WindowsPhoneToastNotify.py index bf18d01c0..eed61adbd 100644 --- a/module/plugins/hooks/WindowsPhoneToastNotify.py +++ b/module/plugins/hooks/WindowsPhoneToastNotify.py @@ -18,6 +18,7 @@ class WindowsPhoneToastNotify(Hook): ("pushTimeout", "int", "Timeout between notifications in seconds", 0)] __description__ = """Send push notifications to Windows Phone""" + __license__ = "GPLv3" __authors__ = [("Andy Voigt", "phone-support@hotmail.de")] -- cgit v1.2.3 From 0eb6e7ec4a1144dcca824d8add049787d3da1762 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Oct 2014 19:44:59 +0200 Subject: Two space before function declaration --- module/plugins/hooks/WindowsPhoneToastNotify.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'module/plugins/hooks/WindowsPhoneToastNotify.py') diff --git a/module/plugins/hooks/WindowsPhoneToastNotify.py b/module/plugins/hooks/WindowsPhoneToastNotify.py index eed61adbd..cf7920b74 100644 --- a/module/plugins/hooks/WindowsPhoneToastNotify.py +++ b/module/plugins/hooks/WindowsPhoneToastNotify.py @@ -25,12 +25,14 @@ class WindowsPhoneToastNotify(Hook): def setup(self): self.info = {} + def getXmlData(self): myxml = (" " " Pyload Mobile Captcha waiting! " " ") return myxml + def doRequest(self): URL = self.getConfig("pushUrl") request = self.getXmlData() @@ -46,6 +48,7 @@ class WindowsPhoneToastNotify(Hook): webservice.close() self.setStorage("LAST_NOTIFY", time.time()) + def newCaptchaTask(self, task): if not self.getConfig("pushId") or not self.getConfig("pushUrl"): return False -- cgit v1.2.3 From 885f8ed782e64d9e73367905e642a84d0a8999f1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 04:01:38 +0100 Subject: Update __config__ --- module/plugins/hooks/WindowsPhoneToastNotify.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/hooks/WindowsPhoneToastNotify.py') diff --git a/module/plugins/hooks/WindowsPhoneToastNotify.py b/module/plugins/hooks/WindowsPhoneToastNotify.py index cf7920b74..d33c2738a 100644 --- a/module/plugins/hooks/WindowsPhoneToastNotify.py +++ b/module/plugins/hooks/WindowsPhoneToastNotify.py @@ -11,8 +11,7 @@ class WindowsPhoneToastNotify(Hook): __type__ = "hook" __version__ = "0.02" - __config__ = [("activated", "bool", "Activated", False), - ("force", "bool", "Force even if client is connected", False), + __config__ = [("force", "bool", "Force even if client is connected", False), ("pushId", "str", "pushId", ""), ("pushUrl", "str", "pushUrl", ""), ("pushTimeout", "int", "Timeout between notifications in seconds", 0)] -- cgit v1.2.3 From 34984dae733c3f3d47b41a0acfba3724d53c65a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:52:10 +0100 Subject: Code cosmetics: plugin class attributes --- module/plugins/hooks/WindowsPhoneToastNotify.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hooks/WindowsPhoneToastNotify.py') diff --git a/module/plugins/hooks/WindowsPhoneToastNotify.py b/module/plugins/hooks/WindowsPhoneToastNotify.py index d33c2738a..746aa188d 100644 --- a/module/plugins/hooks/WindowsPhoneToastNotify.py +++ b/module/plugins/hooks/WindowsPhoneToastNotify.py @@ -7,8 +7,8 @@ from module.plugins.Hook import Hook class WindowsPhoneToastNotify(Hook): - __name__ = "WindowsPhoneToastNotify" - __type__ = "hook" + __name__ = "WindowsPhoneToastNotify" + __type__ = "hook" __version__ = "0.02" __config__ = [("force", "bool", "Force even if client is connected", False), @@ -17,8 +17,8 @@ class WindowsPhoneToastNotify(Hook): ("pushTimeout", "int", "Timeout between notifications in seconds", 0)] __description__ = """Send push notifications to Windows Phone""" - __license__ = "GPLv3" - __authors__ = [("Andy Voigt", "phone-support@hotmail.de")] + __license__ = "GPLv3" + __authors__ = [("Andy Voigt", "phone-support@hotmail.de")] def setup(self): -- cgit v1.2.3 From 59f72bfc5ed721c80c821bd0ca1bc8daf0d49880 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 9 Nov 2014 03:12:41 +0100 Subject: Code cosmetics --- module/plugins/hooks/WindowsPhoneToastNotify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hooks/WindowsPhoneToastNotify.py') diff --git a/module/plugins/hooks/WindowsPhoneToastNotify.py b/module/plugins/hooks/WindowsPhoneToastNotify.py index 746aa188d..053ea47d0 100644 --- a/module/plugins/hooks/WindowsPhoneToastNotify.py +++ b/module/plugins/hooks/WindowsPhoneToastNotify.py @@ -22,7 +22,7 @@ class WindowsPhoneToastNotify(Hook): def setup(self): - self.info = {} + self.info = {} #@TODO: Remove in 0.4.10 def getXmlData(self): -- cgit v1.2.3 From e4c9e4ffc9e3f6bd6b16ce83796dc3d275d544f7 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 9 Dec 2014 01:13:05 +0100 Subject: Don't start unused periodical in some addons --- module/plugins/hooks/WindowsPhoneToastNotify.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'module/plugins/hooks/WindowsPhoneToastNotify.py') diff --git a/module/plugins/hooks/WindowsPhoneToastNotify.py b/module/plugins/hooks/WindowsPhoneToastNotify.py index 053ea47d0..ed305778c 100644 --- a/module/plugins/hooks/WindowsPhoneToastNotify.py +++ b/module/plugins/hooks/WindowsPhoneToastNotify.py @@ -9,7 +9,7 @@ from module.plugins.Hook import Hook class WindowsPhoneToastNotify(Hook): __name__ = "WindowsPhoneToastNotify" __type__ = "hook" - __version__ = "0.02" + __version__ = "0.03" __config__ = [("force", "bool", "Force even if client is connected", False), ("pushId", "str", "pushId", ""), @@ -21,6 +21,11 @@ class WindowsPhoneToastNotify(Hook): __authors__ = [("Andy Voigt", "phone-support@hotmail.de")] + #@TODO: Remove in 0.4.10 + def initPeriodical(self): + pass + + def setup(self): self.info = {} #@TODO: Remove in 0.4.10 -- cgit v1.2.3