summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/Account.py11
-rw-r--r--module/plugins/accounts/RapidshareCom.py5
-rw-r--r--module/plugins/accounts/UploadedTo.py7
3 files changed, 18 insertions, 5 deletions
diff --git a/module/plugins/Account.py b/module/plugins/Account.py
index de5fb00d6..bdbbd4c1c 100644
--- a/module/plugins/Account.py
+++ b/module/plugins/Account.py
@@ -43,8 +43,13 @@ class Account():
for user, data in self.accounts:
self.login(user, data)
- def updateAccounts(self, user, password):
- self.accounts[user]["password"] if self.accounts.has_key(user) else self.accounts[user] = {"password":password}
+ def updateAccounts(self, user, password, options):
+ if self.accounts.has_key(user):
+ self.accounts[user]["password"] = password
+ self.accounts[user]["options"] = options
+ else:
+ self.accounts[user] = {"password" : password, "options": options}
+
self.login(user, self.accounts[user])
def removeAccount(self, user):
@@ -54,6 +59,8 @@ class Account():
return {
"validuntil": None,
"login": name,
+ "password": self.accounts[name]["password"],
+ "options": self.accounts[name]["options"],
"trafficleft": None,
"type": self.__name__
}
diff --git a/module/plugins/accounts/RapidshareCom.py b/module/plugins/accounts/RapidshareCom.py
index 233cd9801..052470ada 100644
--- a/module/plugins/accounts/RapidshareCom.py
+++ b/module/plugins/accounts/RapidshareCom.py
@@ -47,7 +47,10 @@ class RapidshareCom(Account):
continue
k, v = t.split("=")
info[k] = v
- out = {"validuntil":None, "login":str(info["accountid"]), "trafficleft":int(info["tskb"]), "type":self.__name__}
+
+ out = Account.getAccountInfo(self, user)
+ tmp = {"validuntil":None, "login":str(info["accountid"]), "trafficleft":int(info["tskb"]), "type":self.__name__}
+ out.update(tmp)
return out
diff --git a/module/plugins/accounts/UploadedTo.py b/module/plugins/accounts/UploadedTo.py
index 242e6cd5e..d2aa22b22 100644
--- a/module/plugins/accounts/UploadedTo.py
+++ b/module/plugins/accounts/UploadedTo.py
@@ -42,8 +42,11 @@ class UploadedTo(Account):
raw_valid = re.search(r"Valid until: </span> <span class=.*?>(.*?)</span>", html).group(1)
traffic = int(self.parseTraffic(raw_traffic))
validuntil = int(mktime(strptime(raw_valid.strip(), "%d-%m-%Y %H:%M")))
- return {"login":user, "validuntil":validuntil, "trafficleft":traffic, "type":self.__name__}
-
+ out = Account.getAccountInfo(self, user)
+ tmp = {"login":user, "validuntil":validuntil, "trafficleft":traffic, "type":self.__name__}
+ out.update(tmp)
+ return out
+
def login(self, user, data):
req = self.core.requestFactory.getRequest(self.__name__, user)
req.load("http://uploaded.to/login", None, { "email" : user, "password" : data["password"]}, cookies=True)