diff options
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/Account.py | 9 | ||||
-rw-r--r-- | module/plugins/accounts/RapidshareCom.py | 4 | ||||
-rw-r--r-- | module/plugins/accounts/ShareonlineBiz.py | 5 | ||||
-rw-r--r-- | module/plugins/accounts/UploadedTo.py | 2 |
4 files changed, 14 insertions, 6 deletions
diff --git a/module/plugins/Account.py b/module/plugins/Account.py index af8b6ebe8..61101347d 100644 --- a/module/plugins/Account.py +++ b/module/plugins/Account.py @@ -57,12 +57,13 @@ class Account(): def getAccountInfo(self, name): return { - "validuntil": None, + "validuntil": None, # -1 for unlimited "login": name, - "password": self.accounts[name]["password"], + #"password": self.accounts[name]["password"], #@XXX: security "options": self.accounts[name]["options"], - "trafficleft": None, - "type": self.__name__ + "trafficleft": None, # -1 for unlimited + "maxtraffic": None, + "type": self.__name__, } def getAllAccounts(self): 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: |