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/LinksnappyCom.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'module/plugins/hooks/LinksnappyCom.py') diff --git a/module/plugins/hooks/LinksnappyCom.py b/module/plugins/hooks/LinksnappyCom.py index 96bf1c0d1..a1c4b90f7 100644 --- a/module/plugins/hooks/LinksnappyCom.py +++ b/module/plugins/hooks/LinksnappyCom.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 LinksnappyCom(MultiHook): __name__ = "LinksnappyCom" __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)", ""), - ("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)] __description__ = """Linksnappy.com hook plugin""" @@ -20,8 +19,8 @@ class LinksnappyCom(MultiHook): __authors__ = [("stickell", "l.stickell@yahoo.it")] - def getHoster(self): - json_data = getURL("http://gen.linksnappy.com/lseAPI.php", get={'act': "FILEHOSTS"}) + def getHosters(self): + json_data = self.getURL("http://gen.linksnappy.com/lseAPI.php", get={'act': "FILEHOSTS"}) json_data = json_loads(json_data) return json_data['return'].keys() -- cgit v1.2.3