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/UnrestrictLi.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/hooks/UnrestrictLi.py') diff --git a/module/plugins/hooks/UnrestrictLi.py b/module/plugins/hooks/UnrestrictLi.py index 4f8f11625..3303c7355 100644 --- a/module/plugins/hooks/UnrestrictLi.py +++ b/module/plugins/hooks/UnrestrictLi.py @@ -23,6 +23,7 @@ class UnrestrictLi(MultiHoster): __name__ = "UnrestrictLi" __version__ = "0.02" __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), ("hosterList", "str", "Hoster list (comma separated)", ""), @@ -34,6 +35,7 @@ class UnrestrictLi(MultiHoster): __author_name__ = "stickell" __author_mail__ = "l.stickell@yahoo.it" + def getHoster(self): json_data = getURL('http://unrestrict.li/api/jdownloader/hosts.php?format=json') json_data = json_loads(json_data) -- 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/UnrestrictLi.py | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'module/plugins/hooks/UnrestrictLi.py') diff --git a/module/plugins/hooks/UnrestrictLi.py b/module/plugins/hooks/UnrestrictLi.py index 3303c7355..ee5d79269 100644 --- a/module/plugins/hooks/UnrestrictLi.py +++ b/module/plugins/hooks/UnrestrictLi.py @@ -1,28 +1,14 @@ # -*- coding: utf-8 -*- -############################################################################ -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU Affero 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 Affero General Public License for more details. # -# # -# You should have received a copy of the GNU Affero General Public License # -# along with this program. If not, see . # -############################################################################ -from module.plugins.internal.MultiHoster import MultiHoster -from module.network.RequestFactory import getURL from module.common.json_layer import json_loads +from module.network.RequestFactory import getURL +from module.plugins.internal.MultiHoster import MultiHoster class UnrestrictLi(MultiHoster): __name__ = "UnrestrictLi" - __version__ = "0.02" __type__ = "hook" + __version__ = "0.02" __config__ = [("activated", "bool", "Activated", False), ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), -- 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/UnrestrictLi.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/hooks/UnrestrictLi.py') diff --git a/module/plugins/hooks/UnrestrictLi.py b/module/plugins/hooks/UnrestrictLi.py index ee5d79269..9dc417bf9 100644 --- a/module/plugins/hooks/UnrestrictLi.py +++ b/module/plugins/hooks/UnrestrictLi.py @@ -18,8 +18,7 @@ class UnrestrictLi(MultiHoster): ("history", "bool", "Delete History", False)] __description__ = """Unrestrict.li hook plugin""" - __author_name__ = "stickell" - __author_mail__ = "l.stickell@yahoo.it" + __authors__ = [("stickell", "l.stickell@yahoo.it")] def getHoster(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/UnrestrictLi.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hooks/UnrestrictLi.py') diff --git a/module/plugins/hooks/UnrestrictLi.py b/module/plugins/hooks/UnrestrictLi.py index 9dc417bf9..28f0289c7 100644 --- a/module/plugins/hooks/UnrestrictLi.py +++ b/module/plugins/hooks/UnrestrictLi.py @@ -18,6 +18,7 @@ class UnrestrictLi(MultiHoster): ("history", "bool", "Delete History", False)] __description__ = """Unrestrict.li hook plugin""" + __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] -- 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/UnrestrictLi.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/hooks/UnrestrictLi.py') diff --git a/module/plugins/hooks/UnrestrictLi.py b/module/plugins/hooks/UnrestrictLi.py index 28f0289c7..5184f5850 100644 --- a/module/plugins/hooks/UnrestrictLi.py +++ b/module/plugins/hooks/UnrestrictLi.py @@ -10,8 +10,7 @@ class UnrestrictLi(MultiHoster): __type__ = "hook" __version__ = "0.02" - __config__ = [("activated", "bool", "Activated", False), - ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), ("hosterList", "str", "Hoster list (comma separated)", ""), ("unloadFailing", "bool", "Revert to standard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 24), -- 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/UnrestrictLi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hooks/UnrestrictLi.py') diff --git a/module/plugins/hooks/UnrestrictLi.py b/module/plugins/hooks/UnrestrictLi.py index 5184f5850..295cfaf5a 100644 --- a/module/plugins/hooks/UnrestrictLi.py +++ b/module/plugins/hooks/UnrestrictLi.py @@ -6,8 +6,8 @@ from module.plugins.internal.MultiHoster import MultiHoster class UnrestrictLi(MultiHoster): - __name__ = "UnrestrictLi" - __type__ = "hook" + __name__ = "UnrestrictLi" + __type__ = "hook" __version__ = "0.02" __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), @@ -17,8 +17,8 @@ class UnrestrictLi(MultiHoster): ("history", "bool", "Delete History", False)] __description__ = """Unrestrict.li hook plugin""" - __license__ = "GPLv3" - __authors__ = [("stickell", "l.stickell@yahoo.it")] + __license__ = "GPLv3" + __authors__ = [("stickell", "l.stickell@yahoo.it")] def getHoster(self): -- cgit v1.2.3 From 67587fbe0335cacfde28a86ba729b9d567ce1da7 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 7 Dec 2014 00:27:18 +0100 Subject: Plugin code cosmetics (3) --- module/plugins/hooks/UnrestrictLi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hooks/UnrestrictLi.py') diff --git a/module/plugins/hooks/UnrestrictLi.py b/module/plugins/hooks/UnrestrictLi.py index 295cfaf5a..d87265ef4 100644 --- a/module/plugins/hooks/UnrestrictLi.py +++ b/module/plugins/hooks/UnrestrictLi.py @@ -22,7 +22,7 @@ class UnrestrictLi(MultiHoster): def getHoster(self): - json_data = getURL('http://unrestrict.li/api/jdownloader/hosts.php?format=json') + json_data = getURL("http://unrestrict.li/api/jdownloader/hosts.php", get={'format': "json"}) json_data = json_loads(json_data) host_list = [element['host'] for element in json_data['result']] -- cgit v1.2.3 From 57a319563651a07bf8265ab52da0d7375191319c Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 23 Dec 2014 13:13:42 +0100 Subject: Rename MultiHoster plugin to MultiHook --- module/plugins/hooks/UnrestrictLi.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hooks/UnrestrictLi.py') diff --git a/module/plugins/hooks/UnrestrictLi.py b/module/plugins/hooks/UnrestrictLi.py index d87265ef4..245264d44 100644 --- a/module/plugins/hooks/UnrestrictLi.py +++ b/module/plugins/hooks/UnrestrictLi.py @@ -2,13 +2,13 @@ from module.common.json_layer import json_loads from module.network.RequestFactory import getURL -from module.plugins.internal.MultiHoster import MultiHoster +from module.plugins.internal.MultiHook import MultiHook -class UnrestrictLi(MultiHoster): +class UnrestrictLi(MultiHook): __name__ = "UnrestrictLi" __type__ = "hook" - __version__ = "0.02" + __version__ = "0.03" __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), ("hosterList", "str", "Hoster list (comma separated)", ""), -- cgit v1.2.3 From 575ce629081995766a231f0a9f3e97e3b79d23b1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Dec 2014 21:20:59 +0100 Subject: Update MultiHook based hooks --- module/plugins/hooks/UnrestrictLi.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'module/plugins/hooks/UnrestrictLi.py') diff --git a/module/plugins/hooks/UnrestrictLi.py b/module/plugins/hooks/UnrestrictLi.py index 245264d44..e481e8449 100644 --- a/module/plugins/hooks/UnrestrictLi.py +++ b/module/plugins/hooks/UnrestrictLi.py @@ -1,18 +1,17 @@ # -*- coding: utf-8 -*- from module.common.json_layer import json_loads -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook class UnrestrictLi(MultiHook): __name__ = "UnrestrictLi" __type__ = "hook" - __version__ = "0.03" + __version__ = "0.04" - __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), - ("hosterList", "str", "Hoster list (comma separated)", ""), - ("unloadFailing", "bool", "Revert to standard download if download fails", False), + __config__ = [("mode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + ("pluginlist", "str", "Hoster list (comma separated)", ""), + ("revertfailed", "bool", "Revert to standard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 24), ("history", "bool", "Delete History", False)] @@ -21,8 +20,8 @@ class UnrestrictLi(MultiHook): __authors__ = [("stickell", "l.stickell@yahoo.it")] - def getHoster(self): - json_data = getURL("http://unrestrict.li/api/jdownloader/hosts.php", get={'format': "json"}) + def getHosters(self): + json_data = self.getURL("http://unrestrict.li/api/jdownloader/hosts.php", get={'format': "json"}) json_data = json_loads(json_data) host_list = [element['host'] for element in json_data['result']] -- cgit v1.2.3