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/PremiumTo.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'module/plugins/hooks/PremiumTo.py') diff --git a/module/plugins/hooks/PremiumTo.py b/module/plugins/hooks/PremiumTo.py index 3087db552..348bb6789 100644 --- a/module/plugins/hooks/PremiumTo.py +++ b/module/plugins/hooks/PremiumTo.py @@ -1,16 +1,15 @@ # -*- coding: utf-8 -*- -from module.network.RequestFactory import getURL from module.plugins.internal.MultiHook import MultiHook class PremiumTo(MultiHook): __name__ = "PremiumTo" __type__ = "hook" - __version__ = "0.05" + __version__ = "0.06" - __config__ = [("hosterListMode", "all;listed;unlisted", "Use for downloads from supported hosters:", "all"), - ("hosterList", "str", "Hoster list (comma separated)", "")] + __config__ = [("mode", "all;listed;unlisted", "Use for downloads from supported hosters:", "all"), + ("pluginlist", "str", "Hoster list (comma separated)", "")] __description__ = """Premium.to hook plugin""" __license__ = "GPLv3" @@ -19,8 +18,8 @@ class PremiumTo(MultiHook): ("stickell", "l.stickell@yahoo.it")] - def getHoster(self): - page = getURL("http://premium.to/api/hosters.php", + def getHosters(self): + page = self.getURL("http://premium.to/api/hosters.php", get={'username': self.account.username, 'password': self.account.password}) return [x.strip() for x in page.replace("\"", "").split(";")] -- cgit v1.2.3 From e0cba81ae8d59ee24e1cd1f1cf1697c5e61118ce Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 2 Jan 2015 02:37:18 +0100 Subject: [PremiumTo] Fixup --- module/plugins/hooks/PremiumTo.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'module/plugins/hooks/PremiumTo.py') diff --git a/module/plugins/hooks/PremiumTo.py b/module/plugins/hooks/PremiumTo.py index 348bb6789..a4203c8bb 100644 --- a/module/plugins/hooks/PremiumTo.py +++ b/module/plugins/hooks/PremiumTo.py @@ -6,7 +6,7 @@ from module.plugins.internal.MultiHook import MultiHook class PremiumTo(MultiHook): __name__ = "PremiumTo" __type__ = "hook" - __version__ = "0.06" + __version__ = "0.07" __config__ = [("mode", "all;listed;unlisted", "Use for downloads from supported hosters:", "all"), ("pluginlist", "str", "Hoster list (comma separated)", "")] @@ -22,15 +22,3 @@ class PremiumTo(MultiHook): page = self.getURL("http://premium.to/api/hosters.php", get={'username': self.account.username, 'password': self.account.password}) return [x.strip() for x in page.replace("\"", "").split(";")] - - - def coreReady(self): - self.account = self.core.accountManager.getAccountPlugin("PremiumTo") - - user = self.account.selectAccount()[0] - - if not user: - self.logError(_("Please add your premium.to account first and restart pyLoad")) - return - - return MultiHook.coreReady(self) -- cgit v1.2.3 From e977be3c78ea9d976e9b2338244b214a4b3a5199 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 8 Jan 2015 23:40:17 +0100 Subject: "New Year" Update: hook plugins --- module/plugins/hooks/PremiumTo.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'module/plugins/hooks/PremiumTo.py') diff --git a/module/plugins/hooks/PremiumTo.py b/module/plugins/hooks/PremiumTo.py index a4203c8bb..844ecc89d 100644 --- a/module/plugins/hooks/PremiumTo.py +++ b/module/plugins/hooks/PremiumTo.py @@ -6,10 +6,15 @@ from module.plugins.internal.MultiHook import MultiHook class PremiumTo(MultiHook): __name__ = "PremiumTo" __type__ = "hook" - __version__ = "0.07" + __version__ = "0.08" - __config__ = [("mode", "all;listed;unlisted", "Use for downloads from supported hosters:", "all"), - ("pluginlist", "str", "Hoster list (comma separated)", "")] + __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), + ("pluginlist" , "str" , "Plugin list (comma separated)" , "" ), + ("revertfailed" , "bool" , "Revert to standard download if fails", True ), + ("retry" , "int" , "Number of retries before revert" , 10 ), + ("retryinterval" , "int" , "Retry interval in minutes" , 1 ), + ("reload" , "bool" , "Reload plugin list" , True ), + ("reloadinterval", "int" , "Reload interval in hours" , 12 )] __description__ = """Premium.to hook plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From b25bc61dd47d8d3c42969bd0f72443b21c4b059e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 8 Feb 2015 02:09:45 +0100 Subject: Spare code cosmetics --- module/plugins/hooks/PremiumTo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hooks/PremiumTo.py') diff --git a/module/plugins/hooks/PremiumTo.py b/module/plugins/hooks/PremiumTo.py index 844ecc89d..b629b111e 100644 --- a/module/plugins/hooks/PremiumTo.py +++ b/module/plugins/hooks/PremiumTo.py @@ -24,6 +24,6 @@ class PremiumTo(MultiHook): def getHosters(self): - page = self.getURL("http://premium.to/api/hosters.php", + html = self.getURL("http://premium.to/api/hosters.php", get={'username': self.account.username, 'password': self.account.password}) - return [x.strip() for x in page.replace("\"", "").split(";")] + return [x.strip() for x in html.replace("\"", "").split(";")] -- cgit v1.2.3 From 6f7002bcc3520c47fafe5122b0e0cbada313887d Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 8 Mar 2015 23:39:59 +0100 Subject: Whitespace cosmetics --- module/plugins/hooks/PremiumTo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hooks/PremiumTo.py') diff --git a/module/plugins/hooks/PremiumTo.py b/module/plugins/hooks/PremiumTo.py index b629b111e..250125016 100644 --- a/module/plugins/hooks/PremiumTo.py +++ b/module/plugins/hooks/PremiumTo.py @@ -18,7 +18,7 @@ class PremiumTo(MultiHook): __description__ = """Premium.to hook plugin""" __license__ = "GPLv3" - __authors__ = [("RaNaN", "RaNaN@pyload.org"), + __authors__ = [("RaNaN" , "RaNaN@pyload.org" ), ("zoidberg", "zoidberg@mujmail.cz"), ("stickell", "l.stickell@yahoo.it")] -- cgit v1.2.3 From 6db62380b80a144aca18335d50c724e9915d8038 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 18 Mar 2015 22:20:17 +0100 Subject: Hooks cleanup --- module/plugins/hooks/PremiumTo.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'module/plugins/hooks/PremiumTo.py') diff --git a/module/plugins/hooks/PremiumTo.py b/module/plugins/hooks/PremiumTo.py index 250125016..f5636cb72 100644 --- a/module/plugins/hooks/PremiumTo.py +++ b/module/plugins/hooks/PremiumTo.py @@ -11,8 +11,6 @@ class PremiumTo(MultiHook): __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)" , "" ), ("revertfailed" , "bool" , "Revert to standard download if fails", True ), - ("retry" , "int" , "Number of retries before revert" , 10 ), - ("retryinterval" , "int" , "Retry interval in minutes" , 1 ), ("reload" , "bool" , "Reload plugin list" , True ), ("reloadinterval", "int" , "Reload interval in hours" , 12 )] -- cgit v1.2.3 From 348a386486d081d86363774e64525484ef159cd6 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Apr 2015 19:23:06 +0200 Subject: Fix https://github.com/pyload/pyload/issues/1157 --- module/plugins/hooks/PremiumTo.py | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 module/plugins/hooks/PremiumTo.py (limited to 'module/plugins/hooks/PremiumTo.py') diff --git a/module/plugins/hooks/PremiumTo.py b/module/plugins/hooks/PremiumTo.py deleted file mode 100644 index f5636cb72..000000000 --- a/module/plugins/hooks/PremiumTo.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- - -from module.plugins.internal.MultiHook import MultiHook - - -class PremiumTo(MultiHook): - __name__ = "PremiumTo" - __type__ = "hook" - __version__ = "0.08" - - __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), - ("pluginlist" , "str" , "Plugin list (comma separated)" , "" ), - ("revertfailed" , "bool" , "Revert to standard download if fails", True ), - ("reload" , "bool" , "Reload plugin list" , True ), - ("reloadinterval", "int" , "Reload interval in hours" , 12 )] - - __description__ = """Premium.to hook plugin""" - __license__ = "GPLv3" - __authors__ = [("RaNaN" , "RaNaN@pyload.org" ), - ("zoidberg", "zoidberg@mujmail.cz"), - ("stickell", "l.stickell@yahoo.it")] - - - def getHosters(self): - html = self.getURL("http://premium.to/api/hosters.php", - get={'username': self.account.username, 'password': self.account.password}) - return [x.strip() for x in html.replace("\"", "").split(";")] -- cgit v1.2.3