summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-08-17 14:36:29 +0200
committerGravatar mkaay <mkaay@mkaay.de> 2010-08-17 14:36:29 +0200
commitc22c64c348e1fd52cc88177c4b5ff099a30a62bd (patch)
treeee5f9cf9f6f1a623dc3a44bad0737ad514efcf76 /module/plugins/accounts
parenthotfile + freakshare fix (diff)
downloadpyload-c22c64c348e1fd52cc88177c4b5ff099a30a62bd.tar.xz
account update
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r--module/plugins/accounts/RapidshareCom.py4
-rw-r--r--module/plugins/accounts/ShareonlineBiz.py5
-rw-r--r--module/plugins/accounts/UploadedTo.py2
3 files changed, 9 insertions, 2 deletions
diff --git a/module/plugins/accounts/RapidshareCom.py b/module/plugins/accounts/RapidshareCom.py
index 7f5fff84d..b656bb763 100644
--- a/module/plugins/accounts/RapidshareCom.py
+++ b/module/plugins/accounts/RapidshareCom.py
@@ -50,7 +50,9 @@ class RapidshareCom(Account):
info[k] = v
out = Account.getAccountInfo(self, user)
- tmp = {"validuntil":None, "login":str(info["accountid"]), "trafficleft":int(info["tskb"]), "type":self.__name__}
+ restkb = int(info["tskb"])
+ maxtraffic = int(info["rapids"])/14 * (5*1024*1024) + restkb
+ tmp = {"validuntil":int(info["billeduntil"]), "trafficleft":maxtraffic if int(info["autorefill"]) else restkb, "maxtraffic":maxtraffic}
out.update(tmp)
return out
diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py
index 69a8ddc0c..3d213557a 100644
--- a/module/plugins/accounts/ShareonlineBiz.py
+++ b/module/plugins/accounts/ShareonlineBiz.py
@@ -28,6 +28,11 @@ class ShareonlineBiz(Account):
__author_mail__ = ("mkaay@mkaay.de")
#@TODO: account info
+ def getAccountInfo(self, user):
+ out = Account.getAccountInfo(self, user)
+ tmp = {"validuntil":None, "trafficleft":-1}
+ out.update(tmp)
+ return out
def login(self, user, data):
req = self.core.requestFactory.getRequest(self.__name__, user)
diff --git a/module/plugins/accounts/UploadedTo.py b/module/plugins/accounts/UploadedTo.py
index 926f91255..764cc50be 100644
--- a/module/plugins/accounts/UploadedTo.py
+++ b/module/plugins/accounts/UploadedTo.py
@@ -44,7 +44,7 @@ class UploadedTo(Account):
traffic = int(self.parseTraffic(raw_traffic))
validuntil = int(mktime(strptime(raw_valid.strip(), "%d-%m-%Y %H:%M")))
out = Account.getAccountInfo(self, user)
- tmp = {"login":user, "validuntil":validuntil, "trafficleft":traffic, "type":self.__name__}
+ tmp = {"validuntil":validuntil, "trafficleft":traffic, "maxtraffic":100*1024*1024}
out.update(tmp)
return out
except: