summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-28 20:40:00 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-28 20:40:00 +0100
commit0d27fda4b6edbfcba9b78b2c3f91063b8464455a (patch)
tree4d094829d9419506868768c90686a11b5b4bae85
parentMerge pull request #928 from Gummibaer/patch-1 (diff)
downloadpyload-0d27fda4b6edbfcba9b78b2c3f91063b8464455a.tar.xz
[XFSAccount] Fix leech traffic detection
-rw-r--r--module/plugins/accounts/EasybytezCom.py8
-rw-r--r--module/plugins/internal/XFSAccount.py14
2 files changed, 14 insertions, 8 deletions
diff --git a/module/plugins/accounts/EasybytezCom.py b/module/plugins/accounts/EasybytezCom.py
index ebc77d03b..0afd93d3b 100644
--- a/module/plugins/accounts/EasybytezCom.py
+++ b/module/plugins/accounts/EasybytezCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSAccount import XFSAccount
class EasybytezCom(XFSAccount):
__name__ = "EasybytezCom"
__type__ = "account"
- __version__ = "0.10"
+ __version__ = "0.11"
__description__ = """EasyBytez.com account plugin"""
__license__ = "GPLv3"
@@ -17,3 +17,9 @@ class EasybytezCom(XFSAccount):
HOSTER_DOMAIN = "easybytez.com"
+
+
+ def loadAccountInfo(self, *args, **kwargs):
+ info = super(EasybytezCom, self).loadAccountInfo(*args, **kwargs)
+ info['leechtraffic'] = 26214400
+ return info
diff --git a/module/plugins/internal/XFSAccount.py b/module/plugins/internal/XFSAccount.py
index f2a4e8a15..5a265c08a 100644
--- a/module/plugins/internal/XFSAccount.py
+++ b/module/plugins/internal/XFSAccount.py
@@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import parseHtmlForm, set_cookies
class XFSAccount(Account):
__name__ = "XFSAccount"
__type__ = "account"
- __version__ = "0.30"
+ __version__ = "0.31"
__description__ = """XFileSharing account plugin"""
__license__ = "GPLv3"
@@ -109,12 +109,12 @@ class XFSAccount(Account):
else:
self.logDebug("TRAFFIC_LEFT_PATTERN not found")
- m = re.finditer(self.LEECH_TRAFFIC_PATTERN, html)
- if m:
+ leech = [m.groupdict() for m in re.finditer(self.LEECH_TRAFFIC_PATTERN, html)]
+ if leech:
leechtraffic = 0
try:
- for leech in m:
- size = leech['S']
+ for traffic in leech:
+ size = traffic['S']
if "nlimited" in size:
leechtraffic = -1
@@ -122,8 +122,8 @@ class XFSAccount(Account):
validuntil = -1
break
else:
- if 'U' in leech:
- unit = leech['U']
+ if 'U' in traffic:
+ unit = traffic['U']
elif isinstance(self.LEECH_TRAFFIC_UNIT, basestring):
unit = self.LEECH_TRAFFIC_UNIT
else: