diff options
-rw-r--r-- | pyload/plugins/accounts/SimplydebridCom.py | 8 | ||||
-rw-r--r-- | pyload/plugins/addons/SimplydebridCom.py | 20 | ||||
-rw-r--r-- | pyload/plugins/hoster/SimplydebridCom.py | 5 |
3 files changed, 10 insertions, 23 deletions
diff --git a/pyload/plugins/accounts/SimplydebridCom.py b/pyload/plugins/accounts/SimplydebridCom.py index 82b499bbd..0b4c82a3b 100644 --- a/pyload/plugins/accounts/SimplydebridCom.py +++ b/pyload/plugins/accounts/SimplydebridCom.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- from time import mktime, strptime -from module.plugins.Account import Account +from pyload.plugins.MultiHoster import MultiHoster -class SimplydebridCom(Account): +class SimplydebridCom(MultiHoster): __name__ = "SimplydebridCom" __version__ = "0.1" __type__ = "account" @@ -28,3 +28,7 @@ class SimplydebridCom(Account): response = req.load("http://simply-debrid.com/api.php", get=get_data, decode=True) if response != "02: loggin success": self.wrongPassword() + + def loadHosterList(self, req): + page = req.load("http://simply-debrid.com/api.php?list=1") + return [x.strip() for x in page.rstrip(';').replace("\"", "").split(";")] diff --git a/pyload/plugins/addons/SimplydebridCom.py b/pyload/plugins/addons/SimplydebridCom.py deleted file mode 100644 index 3272df567..000000000 --- a/pyload/plugins/addons/SimplydebridCom.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- - -from module.network.RequestFactory import getURL -from module.plugins.internal.MultiHoster import MultiHoster - - -class SimplydebridCom(MultiHoster): - __name__ = "SimplydebridCom" - __version__ = "0.01" - __type__ = "hook" - __config__ = [("activated", "bool", "Activated", "False"), - ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), - ("hosterList", "str", "Hoster list (comma separated)", "")] - __description__ = """Simply-Debrid.com hook plugin""" - __author_name__ = ("Kagenoshin") - __author_mail__ = ("kagenoshin@gmx.ch") - - def getHoster(self): - page = getURL("http://simply-debrid.com/api.php?list=1") - return [x.strip() for x in page.rstrip(';').replace("\"", "").split(";")] diff --git a/pyload/plugins/hoster/SimplydebridCom.py b/pyload/plugins/hoster/SimplydebridCom.py index 67cc39255..1b518274d 100644 --- a/pyload/plugins/hoster/SimplydebridCom.py +++ b/pyload/plugins/hoster/SimplydebridCom.py @@ -4,13 +4,16 @@ from urllib import quote, unquote import re -from module.plugins.Hoster import Hoster +from pyload.plugins.Hoster import Hoster class SimplydebridCom(Hoster): __name__ = "SimplydebridCom" __version__ = "0.1" __type__ = "hoster" + __config__ = [("activated", "bool", "Activated", "False"), + ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + ("hosterList", "str", "Hoster list (comma separated)", "")] __pattern__ = r"http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd.php/*" __description__ = """simply-debrid.com hoster plugin""" __author_name__ = ("Kagenoshin") |