summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/SimplydebridCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hooks/SimplydebridCom.py')
-rw-r--r--module/plugins/hooks/SimplydebridCom.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/module/plugins/hooks/SimplydebridCom.py b/module/plugins/hooks/SimplydebridCom.py
index 650de5545..4d27f5ae4 100644
--- a/module/plugins/hooks/SimplydebridCom.py
+++ b/module/plugins/hooks/SimplydebridCom.py
@@ -1,22 +1,26 @@
# -*- coding: utf-8 -*-
-from pyload.network.RequestFactory import getURL
-from pyload.plugin.internal.MultiHoster import MultiHoster
+from module.plugins.internal.MultiHook import MultiHook
-class SimplydebridCom(MultiHoster):
+class SimplydebridCom(MultiHook):
__name__ = "SimplydebridCom"
__type__ = "hook"
- __version__ = "0.01"
+ __version__ = "0.04"
- __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("hosterList", "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__ = """Simply-Debrid.com hook plugin"""
__license__ = "GPLv3"
__authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")]
- def getHoster(self):
- page = getURL("http://simply-debrid.com/api.php", get={'list': 1})
- return [x.strip() for x in page.rstrip(';').replace("\"", "").split(";")]
+ def getHosters(self):
+ html = self.getURL("http://simply-debrid.com/api.php", get={'list': 1})
+ return [x.strip() for x in html.rstrip(';').replace("\"", "").split(";")]