summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-10-18 17:12:53 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-10-18 17:12:53 +0200
commit6891502d1eb47f3db824ee25a8d978284f3e75e7 (patch)
treee6f530c6a3dab287ef9144bdeee527d50a84c2dd
parentNew plugin: Http (diff)
downloadpyload-6891502d1eb47f3db824ee25a8d978284f3e75e7.tar.xz
Multi-hoster accounts now extend MultiAccount class
-rw-r--r--module/plugins/accounts/AlldebridCom.py4
-rw-r--r--module/plugins/accounts/DebridItaliaCom.py4
-rw-r--r--module/plugins/accounts/FastixRu.py12
-rw-r--r--module/plugins/accounts/FreeWayMe.py8
-rw-r--r--module/plugins/accounts/HighWayMe.py10
-rw-r--r--module/plugins/accounts/LinksnappyCom.py10
-rw-r--r--module/plugins/accounts/MegaDebridEu.py12
-rw-r--r--module/plugins/accounts/MegaRapidoNet.py4
-rw-r--r--module/plugins/accounts/MultishareCz.py4
-rw-r--r--module/plugins/accounts/MyfastfileCom.py10
-rw-r--r--module/plugins/accounts/NoPremiumPl.py13
-rw-r--r--module/plugins/accounts/OverLoadMe.py10
-rw-r--r--module/plugins/accounts/PremiumTo.py4
-rw-r--r--module/plugins/accounts/PremiumizeMe.py10
-rw-r--r--module/plugins/accounts/RPNetBiz.py10
-rw-r--r--module/plugins/accounts/RapideoPl.py13
-rw-r--r--module/plugins/accounts/RealdebridCom.py4
-rw-r--r--module/plugins/accounts/RehostTo.py4
-rw-r--r--module/plugins/accounts/SimplyPremiumCom.py10
-rw-r--r--module/plugins/accounts/SimplydebridCom.py4
-rw-r--r--module/plugins/accounts/SmoozedCom.py8
-rw-r--r--module/plugins/accounts/ZeveraCom.py4
-rw-r--r--module/plugins/internal/XFSAccount.py19
23 files changed, 99 insertions, 92 deletions
diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py
index 12d0582a8..81f64ad71 100644
--- a/module/plugins/accounts/AlldebridCom.py
+++ b/module/plugins/accounts/AlldebridCom.py
@@ -6,10 +6,10 @@ import xml.dom.minidom as dom
import BeautifulSoup
-from module.plugins.internal.Account import Account
+from module.plugins.internal.MultiAccount import MultiAccount
-class AlldebridCom(Account):
+class AlldebridCom(MultiAccount):
__name__ = "AlldebridCom"
__type__ = "account"
__version__ = "0.28"
diff --git a/module/plugins/accounts/DebridItaliaCom.py b/module/plugins/accounts/DebridItaliaCom.py
index 50d849a98..4dd315020 100644
--- a/module/plugins/accounts/DebridItaliaCom.py
+++ b/module/plugins/accounts/DebridItaliaCom.py
@@ -3,10 +3,10 @@
import re
import time
-from module.plugins.internal.Account import Account
+from module.plugins.internal.MultiAccount import MultiAccount
-class DebridItaliaCom(Account):
+class DebridItaliaCom(MultiAccount):
__name__ = "DebridItaliaCom"
__type__ = "account"
__version__ = "0.17"
diff --git a/module/plugins/accounts/FastixRu.py b/module/plugins/accounts/FastixRu.py
index 83a02d76b..e407a3d13 100644
--- a/module/plugins/accounts/FastixRu.py
+++ b/module/plugins/accounts/FastixRu.py
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.Account import Account
-from module.common.json_layer import json_loads
+from module.plugins.internal.MultiAccount import MultiAccount
+from module.plugins.internal.utils import json
-class FastixRu(Account):
+class FastixRu(MultiAccount):
__name__ = "FastixRu"
__type__ = "account"
__version__ = "0.08"
@@ -23,13 +23,13 @@ class FastixRu(Account):
html = self.load("http://fastix.ru/api_v2",
get={'apikey': "5182964c3f8f9a7f0b00000a_kelmFB4n1IrnCDYuIFn2y",
'sub' : "allowed_sources"})
- host_list = json_loads(html)
+ host_list = json.loads(html)
host_list = host_list['allow']
return host_list
def grab_info(self, user, password, data):
- html = json_loads(self.load("http://fastix.ru/api_v2/",
+ html = json.loads(self.load("http://fastix.ru/api_v2/",
get={'apikey': data['apikey'],
'sub' : "getaccountdetails"}))
@@ -44,7 +44,7 @@ class FastixRu(Account):
def signin(self, user, password, data):
- api = json_loads(self.load("https://fastix.ru/api_v2/",
+ api = json.loads(self.load("https://fastix.ru/api_v2/",
get={'sub' : "get_apikey",
'email' : user,
'password': password}))
diff --git a/module/plugins/accounts/FreeWayMe.py b/module/plugins/accounts/FreeWayMe.py
index 5e214db35..2bf6b4437 100644
--- a/module/plugins/accounts/FreeWayMe.py
+++ b/module/plugins/accounts/FreeWayMe.py
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.Account import Account
-from module.common.json_layer import json_loads
+from module.plugins.internal.MultiAccount import MultiAccount
+from module.plugins.internal.utils import json
-class FreeWayMe(Account):
+class FreeWayMe(MultiAccount):
__name__ = "FreeWayMe"
__type__ = "account"
__version__ = "0.19"
@@ -60,4 +60,4 @@ class FreeWayMe(Account):
if answer == "Invalid login":
self.fail_login()
- return json_loads(answer)
+ return json.loads(answer)
diff --git a/module/plugins/accounts/HighWayMe.py b/module/plugins/accounts/HighWayMe.py
index 3b39b7da6..cd3a36f16 100644
--- a/module/plugins/accounts/HighWayMe.py
+++ b/module/plugins/accounts/HighWayMe.py
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
-from module.common.json_layer import json_loads
-from module.plugins.internal.Account import Account
+from module.plugins.internal.utils import json
+from module.plugins.internal.MultiAccount import MultiAccount
-class HighWayMe(Account):
+class HighWayMe(MultiAccount):
__name__ = "HighWayMe.py"
__type__ = "account"
__version__ = "0.06"
@@ -20,7 +20,7 @@ class HighWayMe(Account):
def grab_hosters(self, user, password, data):
- json_data = json_loads(self.load("https://high-way.me/api.php",
+ json_data = json.loads(self.load("https://high-way.me/api.php",
get={'hoster': 1}))
return [element['name'] for element in json_data['hoster']]
@@ -34,7 +34,7 @@ class HighWayMe(Account):
self.log_debug("JSON data: %s" % json_data)
- json_data = json_loads(json_data)
+ json_data = json.loads(json_data)
if 'premium' in json_data['user'] and json_data['user']['premium']:
premium = True
diff --git a/module/plugins/accounts/LinksnappyCom.py b/module/plugins/accounts/LinksnappyCom.py
index 6953f311c..d6d50682c 100644
--- a/module/plugins/accounts/LinksnappyCom.py
+++ b/module/plugins/accounts/LinksnappyCom.py
@@ -2,11 +2,11 @@
import hashlib
-from module.plugins.internal.Account import Account
-from module.common.json_layer import json_loads
+from module.plugins.internal.MultiAccount import MultiAccount
+from module.plugins.internal.utils import json
-class LinksnappyCom(Account):
+class LinksnappyCom(MultiAccount):
__name__ = "LinksnappyCom"
__type__ = "account"
__version__ = "0.10"
@@ -23,7 +23,7 @@ class LinksnappyCom(Account):
def grab_hosters(self, user, password, data):
json_data = self.load("http://gen.linksnappy.com/lseAPI.php", get={'act': "FILEHOSTS"})
- json_data = json_loads(json_data)
+ json_data = json.loads(json_data)
return json_data['return'].keys()
@@ -36,7 +36,7 @@ class LinksnappyCom(Account):
self.log_debug("JSON data: " + r)
- j = json_loads(r)
+ j = json.loads(r)
if j['error']:
return {'premium': False}
diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py
index 46375716f..97407b215 100644
--- a/module/plugins/accounts/MegaDebridEu.py
+++ b/module/plugins/accounts/MegaDebridEu.py
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.Account import Account
-from module.common.json_layer import json_loads
+from module.plugins.internal.MultiAccount import MultiAccount
+from module.plugins.internal.utils import json
-class MegaDebridEu(Account):
+class MegaDebridEu(MultiAccount):
__name__ = "MegaDebridEu"
__type__ = "account"
__version__ = "0.24"
@@ -25,7 +25,7 @@ class MegaDebridEu(Account):
def grab_hosters(self, user, password, data):
reponse = self.load("http://www.mega-debrid.eu/api.php", get={'action': "getHosters"})
- json_data = json_loads(reponse)
+ json_data = json.loads(reponse)
if json_data['response_code'] == "ok":
host_list = [element[0] for element in json_data['hosters']]
@@ -41,7 +41,7 @@ class MegaDebridEu(Account):
get={'action' : 'connectUser',
'login' : user,
'password': password})
- res = json_loads(jsonResponse)
+ res = json.loads(jsonResponse)
if res['response_code'] == "ok":
return {'premium': True, 'validuntil': float(res['vip_end']), 'status': True}
@@ -55,6 +55,6 @@ class MegaDebridEu(Account):
get={'action' : 'connectUser',
'login' : user,
'password': password})
- res = json_loads(jsonResponse)
+ res = json.loads(jsonResponse)
if res['response_code'] != "ok":
self.fail_login()
diff --git a/module/plugins/accounts/MegaRapidoNet.py b/module/plugins/accounts/MegaRapidoNet.py
index d8291e0e2..b2bc047bd 100644
--- a/module/plugins/accounts/MegaRapidoNet.py
+++ b/module/plugins/accounts/MegaRapidoNet.py
@@ -3,10 +3,10 @@
import re
import time
-from module.plugins.internal.Account import Account
+from module.plugins.internal.MultiAccount import MultiAccount
-class MegaRapidoNet(Account):
+class MegaRapidoNet(MultiAccount):
__name__ = "MegaRapidoNet"
__type__ = "account"
__version__ = "0.06"
diff --git a/module/plugins/accounts/MultishareCz.py b/module/plugins/accounts/MultishareCz.py
index 16fa57948..e737fad59 100644
--- a/module/plugins/accounts/MultishareCz.py
+++ b/module/plugins/accounts/MultishareCz.py
@@ -2,10 +2,10 @@
import re
-from module.plugins.internal.Account import Account
+from module.plugins.internal.MultiAccount import MultiAccount
-class MultishareCz(Account):
+class MultishareCz(MultiAccount):
__name__ = "MultishareCz"
__type__ = "account"
__version__ = "0.10"
diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py
index eff112a2f..87ed00bca 100644
--- a/module/plugins/accounts/MyfastfileCom.py
+++ b/module/plugins/accounts/MyfastfileCom.py
@@ -2,11 +2,11 @@
import time
-from module.common.json_layer import json_loads
-from module.plugins.internal.Account import Account
+from module.plugins.internal.utils import json
+from module.plugins.internal.MultiAccount import MultiAccount
-class MyfastfileCom(Account):
+class MyfastfileCom(MultiAccount):
__name__ = "MyfastfileCom"
__type__ = "account"
__version__ = "0.08"
@@ -24,7 +24,7 @@ class MyfastfileCom(Account):
def grab_hosters(self, user, password, data):
json_data = self.load("http://myfastfile.com/api.php", get={'hosts': ""})
self.log_debug("JSON data", json_data)
- json_data = json_loads(json_data)
+ json_data = json.loads(json_data)
return json_data['hosts']
@@ -44,6 +44,6 @@ class MyfastfileCom(Account):
self.log_debug("JSON data: " + html)
- self.json_data = json_loads(html)
+ self.json_data = json.loads(html)
if self.json_data['status'] != 'ok':
self.fail_login(_("Invalid username or password"))
diff --git a/module/plugins/accounts/NoPremiumPl.py b/module/plugins/accounts/NoPremiumPl.py
index f8236c978..2619317fb 100644
--- a/module/plugins/accounts/NoPremiumPl.py
+++ b/module/plugins/accounts/NoPremiumPl.py
@@ -4,12 +4,11 @@ import datetime
import hashlib
import time
-from module.common.json_layer import json_loads
-from module.plugins.internal.Account import Account
-# from module.plugins.internal.MultiAccount import MultiAccount
+from module.plugins.internal.utils import json
+from module.plugins.internal.MultiAccount import MultiAccount
-class NoPremiumPl(Account):
+class NoPremiumPl(MultiAccount):
__name__ = "NoPremiumPl"
__type__ = "account"
__version__ = "0.06"
@@ -33,7 +32,7 @@ class NoPremiumPl(Account):
'info' : "1" }
def grab_hosters(self, user, password, data):
- hostings = json_loads(self.load("https://www.nopremium.pl/clipboard.php?json=3").strip())
+ hostings = json.loads(self.load("https://www.nopremium.pl/clipboard.php?json=3").strip())
hostings_domains = [domain for row in hostings for domain in row['domains'] if row['sdownload'] == "0"]
self.log_debug(hostings_domains)
@@ -43,7 +42,7 @@ class NoPremiumPl(Account):
def grab_info(self, user, password, data):
try:
- result = json_loads(self.run_auth_query())
+ result = json.loads(self.run_auth_query())
except Exception:
#@TODO: return or let it be thrown?
@@ -68,7 +67,7 @@ class NoPremiumPl(Account):
data['pwd'] = hashlib.sha1(hashlib.md5(password).hexdigest()).hexdigest()
try:
- response = json_loads(self.run_auth_query())
+ response = json.loads(self.run_auth_query())
except Exception:
self.fail_login()
diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py
index 02d0d2649..74c099114 100644
--- a/module/plugins/accounts/OverLoadMe.py
+++ b/module/plugins/accounts/OverLoadMe.py
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.Account import Account
-from module.common.json_layer import json_loads
+from module.plugins.internal.MultiAccount import MultiAccount
+from module.plugins.internal.utils import json
-class OverLoadMe(Account):
+class OverLoadMe(MultiAccount):
__name__ = "OverLoadMe"
__type__ = "account"
__version__ = "0.08"
@@ -30,7 +30,7 @@ class OverLoadMe(Account):
get={'user': user,
'auth': password}).strip()
- data = json_loads(html)
+ data = json.loads(html)
self.log_debug(data)
#: Check for premium
@@ -45,7 +45,7 @@ class OverLoadMe(Account):
get={'user': user,
'auth': password}).strip()
- data = json_loads(jsondata)
+ data = json.loads(jsondata)
if data['err'] == 1:
self.fail_login()
diff --git a/module/plugins/accounts/PremiumTo.py b/module/plugins/accounts/PremiumTo.py
index 74859d8a5..808fba624 100644
--- a/module/plugins/accounts/PremiumTo.py
+++ b/module/plugins/accounts/PremiumTo.py
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.Account import Account
+from module.plugins.internal.MultiAccount import MultiAccount
-class PremiumTo(Account):
+class PremiumTo(MultiAccount):
__name__ = "PremiumTo"
__type__ = "account"
__version__ = "0.13"
diff --git a/module/plugins/accounts/PremiumizeMe.py b/module/plugins/accounts/PremiumizeMe.py
index 2dc9b8a71..6e1d82108 100644
--- a/module/plugins/accounts/PremiumizeMe.py
+++ b/module/plugins/accounts/PremiumizeMe.py
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
-from module.common.json_layer import json_loads
-from module.plugins.internal.Account import Account
+from module.plugins.internal.utils import json
+from module.plugins.internal.MultiAccount import MultiAccount
-class PremiumizeMe(Account):
+class PremiumizeMe(MultiAccount):
__name__ = "PremiumizeMe"
__type__ = "account"
__version__ = "0.21"
@@ -26,7 +26,7 @@ class PremiumizeMe(Account):
get={'method' : "hosterlist",
'params[login]': user,
'params[pass]' : password})
- data = json_loads(answer)
+ data = json.loads(answer)
#: If account is not valid thera are no hosters available
if data['status'] != 200:
@@ -67,4 +67,4 @@ class PremiumizeMe(Account):
get={'method' : "accountstatus",
'params[login]': user,
'params[pass]' : password})
- return json_loads(answer)
+ return json.loads(answer)
diff --git a/module/plugins/accounts/RPNetBiz.py b/module/plugins/accounts/RPNetBiz.py
index 3b814debc..63f2b4d72 100644
--- a/module/plugins/accounts/RPNetBiz.py
+++ b/module/plugins/accounts/RPNetBiz.py
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.Account import Account
-from module.common.json_layer import json_loads
+from module.plugins.internal.MultiAccount import MultiAccount
+from module.plugins.internal.utils import json
-class RPNetBiz(Account):
+class RPNetBiz(MultiAccount):
__name__ = "RPNetBiz"
__type__ = "account"
__version__ = "0.17"
@@ -24,7 +24,7 @@ class RPNetBiz(Account):
get={'username': user,
'password': password,
'action' : "showHosterList"})
- hoster_list = json_loads(res)
+ hoster_list = json.loads(res)
#: If account is not valid thera are no hosters available
if 'error' in hoster_list:
@@ -68,4 +68,4 @@ class RPNetBiz(Account):
'action': "showAccountInformation"})
self.log_debug("JSON data: %s" % res)
- return json_loads(res)
+ return json.loads(res)
diff --git a/module/plugins/accounts/RapideoPl.py b/module/plugins/accounts/RapideoPl.py
index fc17622b0..205cd743a 100644
--- a/module/plugins/accounts/RapideoPl.py
+++ b/module/plugins/accounts/RapideoPl.py
@@ -4,12 +4,11 @@ import datetime
import hashlib
import time
-from module.common.json_layer import json_loads
-from module.plugins.internal.Account import Account
-# from module.plugins.internal.MultiAccount import MultiAccount
+from module.plugins.internal.utils import json
+from module.plugins.internal.MultiAccount import MultiAccount
-class RapideoPl(Account):
+class RapideoPl(MultiAccount):
__name__ = "RapideoPl"
__type__ = "account"
__version__ = "0.06"
@@ -33,7 +32,7 @@ class RapideoPl(Account):
'info' : "1" }
def grab_hosters(self, user, password, data):
- hostings = json_loads(self.load("https://www.rapideo.pl/clipboard.php?json=3").strip())
+ hostings = json.loads(self.load("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.log_debug(hostings_domains)
@@ -43,7 +42,7 @@ class RapideoPl(Account):
def grab_info(self, user, password, data):
try:
- result = json_loads(self.run_auth_query())
+ result = json.loads(self.run_auth_query())
except Exception:
#@TODO: return or let it be thrown?
@@ -68,7 +67,7 @@ class RapideoPl(Account):
data['pwd'] = hashlib.md5(password).hexdigest()
try:
- response = json_loads(self.run_auth_query())
+ response = json.loads(self.run_auth_query())
except Exception:
self.fail_login()
diff --git a/module/plugins/accounts/RealdebridCom.py b/module/plugins/accounts/RealdebridCom.py
index 63ef62da0..c94a50732 100644
--- a/module/plugins/accounts/RealdebridCom.py
+++ b/module/plugins/accounts/RealdebridCom.py
@@ -2,10 +2,10 @@
import xml.dom.minidom as dom
-from module.plugins.internal.Account import Account
+from module.plugins.internal.MultiAccount import MultiAccount
-class RealdebridCom(Account):
+class RealdebridCom(MultiAccount):
__name__ = "RealdebridCom"
__type__ = "account"
__version__ = "0.50"
diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py
index 4ff3f15a8..2aed00966 100644
--- a/module/plugins/accounts/RehostTo.py
+++ b/module/plugins/accounts/RehostTo.py
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.Account import Account
+from module.plugins.internal.MultiAccount import MultiAccount
-class RehostTo(Account):
+class RehostTo(MultiAccount):
__name__ = "RehostTo"
__type__ = "account"
__version__ = "0.21"
diff --git a/module/plugins/accounts/SimplyPremiumCom.py b/module/plugins/accounts/SimplyPremiumCom.py
index 2be8782ce..2f1b7c85e 100644
--- a/module/plugins/accounts/SimplyPremiumCom.py
+++ b/module/plugins/accounts/SimplyPremiumCom.py
@@ -1,11 +1,11 @@
# -*- coding: utf-8 -*-
-from module.common.json_layer import json_loads
-from module.plugins.internal.Account import Account
+from module.plugins.internal.utils import json
+from module.plugins.internal.MultiAccount import MultiAccount
from module.plugins.internal.Plugin import set_cookie
-class SimplyPremiumCom(Account):
+class SimplyPremiumCom(MultiAccount):
__name__ = "SimplyPremiumCom"
__type__ = "account"
__version__ = "0.10"
@@ -22,7 +22,7 @@ class SimplyPremiumCom(Account):
def grab_hosters(self, user, password, data):
json_data = self.load("http://www.simply-premium.com/api/hosts.php", get={'format': "json", 'online': 1})
- json_data = json_loads(json_data)
+ json_data = json.loads(json_data)
host_list = [element['regex'] for element in json_data['result']]
@@ -38,7 +38,7 @@ class SimplyPremiumCom(Account):
self.log_debug("JSON data: %s" % json_data)
- json_data = json_loads(json_data)
+ json_data = json.loads(json_data)
if 'vip' in json_data['result'] and json_data['result']['vip']:
premium = True
diff --git a/module/plugins/accounts/SimplydebridCom.py b/module/plugins/accounts/SimplydebridCom.py
index bd56dd5ec..52dc5fcfa 100644
--- a/module/plugins/accounts/SimplydebridCom.py
+++ b/module/plugins/accounts/SimplydebridCom.py
@@ -2,10 +2,10 @@
import time
-from module.plugins.internal.Account import Account
+from module.plugins.internal.MultiAccount import MultiAccount
-class SimplydebridCom(Account):
+class SimplydebridCom(MultiAccount):
__name__ = "SimplydebridCom"
__type__ = "account"
__version__ = "0.15"
diff --git a/module/plugins/accounts/SmoozedCom.py b/module/plugins/accounts/SmoozedCom.py
index 1c3da5269..159b2784d 100644
--- a/module/plugins/accounts/SmoozedCom.py
+++ b/module/plugins/accounts/SmoozedCom.py
@@ -19,11 +19,11 @@ except ImportError:
def hexread(self, octets):
return b2a_hex(pbkdf2(self.passphrase, self.salt, self.iterations, octets))
-from module.common.json_layer import json_loads
-from module.plugins.internal.Account import Account
+from module.plugins.internal.utils import json
+from module.plugins.internal.MultiAccount import MultiAccount
-class SmoozedCom(Account):
+class SmoozedCom(MultiAccount):
__name__ = "SmoozedCom"
__type__ = "account"
__version__ = "0.09"
@@ -83,6 +83,6 @@ class SmoozedCom(Account):
salt = hashlib.sha256(password).hexdigest()
encrypted = PBKDF2(password, salt, iterations=1000).hexread(32)
- return json_loads(self.load("http://www2.smoozed.com/api/login",
+ return json.loads(self.load("http://www2.smoozed.com/api/login",
get={'auth': user,
'password': encrypted}))
diff --git a/module/plugins/accounts/ZeveraCom.py b/module/plugins/accounts/ZeveraCom.py
index c94ad6db7..7268eb614 100644
--- a/module/plugins/accounts/ZeveraCom.py
+++ b/module/plugins/accounts/ZeveraCom.py
@@ -2,10 +2,10 @@
import time
-from module.plugins.internal.Account import Account
+from module.plugins.internal.MultiAccount import MultiAccount
-class ZeveraCom(Account):
+class ZeveraCom(MultiAccount):
__name__ = "ZeveraCom"
__type__ = "account"
__version__ = "0.30"
diff --git a/module/plugins/internal/XFSAccount.py b/module/plugins/internal/XFSAccount.py
index e3290b5bb..94dabaed8 100644
--- a/module/plugins/internal/XFSAccount.py
+++ b/module/plugins/internal/XFSAccount.py
@@ -4,17 +4,22 @@ import re
import time
import urlparse
-from module.plugins.internal.Account import Account
-# from module.plugins.internal.MultiAccount import MultiAccount
-from module.plugins.internal.Plugin import parse_html_form, parse_time, set_cookie
+from module.plugins.internal.MultiAccount import MultiAccount
+from module.plugins.internal.utils import parse_html_form, parse_time, set_cookie
-class XFSAccount(Account):
+class XFSAccount(MultiAccount):
__name__ = "XFSAccount"
__type__ = "account"
__version__ = "0.53"
__status__ = "testing"
+ __config__ = [("activated" , "bool" , "Activated" , True ),
+ ("multi" , "bool" , "Multi-hoster" , True ),
+ ("multi_mode" , "all;listed;unlisted", "Hosters to use" , "all"),
+ ("multi_list" , "str" , "Hoster list (comma separated)", "" ),
+ ("multi_interval", "int" , "Reload interval in hours" , 12 )]
+
__description__ = """XFileSharing account plugin"""
__license__ = "GPLv3"
__authors__ = [("zoidberg" , "zoidberg@mujmail.cz"),
@@ -44,7 +49,7 @@ class XFSAccount(Account):
def set_xfs_cookie(self):
if not self.PLUGIN_DOMAIN:
- self.log_error(_("Unable to set xfs cookie due missing PLUGIN_DOMAIN"))
+ self.log_warning(_("Unable to set xfs cookie due missing PLUGIN_DOMAIN"))
return
cookie = (self.PLUGIN_DOMAIN, "lang", "english")
@@ -55,6 +60,10 @@ class XFSAccount(Account):
set_cookie(self.req.cj, *cookie)
+ def grab_hosters(self, user, password, data):
+ pass
+
+
def grab_info(self, user, password, data):
validuntil = None
trafficleft = None