diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-30 23:55:14 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-30 23:55:14 +0100 |
commit | e80c02c9481da980be4594725e5a68150a54731b (patch) | |
tree | aebb20e04b88d54488e90a7b5d5b53afba110597 | |
parent | Merge pull request #993 from synweap15/nopremium-multihook-fix (diff) | |
parent | transition to multihook fix (diff) | |
download | pyload-e80c02c9481da980be4594725e5a68150a54731b.tar.xz |
Merge pull request #994 from synweap15/rapideo-multihook-fix
[Rapideo.pl] Transition to Multihook fix
-rw-r--r-- | module/plugins/hooks/RapideoPl.py | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/module/plugins/hooks/RapideoPl.py b/module/plugins/hooks/RapideoPl.py index a5d7a34a5..9eb454897 100644 --- a/module/plugins/hooks/RapideoPl.py +++ b/module/plugins/hooks/RapideoPl.py @@ -1,31 +1,28 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.MultiHoster import MultiHoster -from module.network.RequestFactory import getURL +from module.plugins.internal.MultiHook import MultiHook from module.common.json_layer import json_loads as loads -class RapideoPl(MultiHoster): +class RapideoPl(MultiHook): __name__ = "RapideoPl" - __version__ = "0.01" + __version__ = "0.02" __type__ = "hook" - __config__ = [("activated", "bool", "Activated", "False"), + __config__ = [("activated", "bool", "Activated", False), ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"), ("hosterList", "str", "Hoster list (comma separated)", ""), - ("unloadFailing", "bool", "Try standard download if download fails", "False"), - ("interval", "int", "Reload supported hosts interval in hours (0 to disable)", "24")] + ("unloadFailing", "bool", "Try standard download if download fails", False), + ("interval", "int", "Reload supported hosts interval in hours (0 to disable)", 24)] __description__ = "Rapideo.pl hook" __license__ = "GPLv3" __authors__ = [("goddie", "dev@rapideo.pl")] - def getHoster(self): - hostings = loads(getURL("https://www.rapideo.pl/clipboard.php?json=3").strip()) - - return [domain for row in hostings for domain in row["domains"] if row["sdownload"] == "0"] - - def getHosterCached(self): - return self.getHoster() + def getHosters(self): + hostings = loads(self.getURL("https://www.rapideo.pl/clipboard.php?json=3").strip()) + hostings_domains = [domain for row in hostings for domain in row["domains"] if row["sdownload"] == "0"] + self.logDebug(hostings_domains) + return hostings_domains |