diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-02-19 17:30:19 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-02-19 17:30:19 +0100 |
commit | 3ba26e380b7ce9ad59ac097482d8a15a97129896 (patch) | |
tree | a603c6281b4aa4f3cfc306cc5d677f01c91ca326 /module/plugins | |
parent | closed #242, #243, #244 (diff) | |
download | pyload-3ba26e380b7ce9ad59ac097482d8a15a97129896.tar.xz |
closing all shareonline request correctly
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/accounts/ShareonlineBiz.py | 5 | ||||
-rw-r--r-- | module/plugins/hoster/ShareonlineBiz.py | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py index 3ba646bdc..ac8b6a2b3 100644 --- a/module/plugins/accounts/ShareonlineBiz.py +++ b/module/plugins/accounts/ShareonlineBiz.py @@ -29,8 +29,7 @@ class ShareonlineBiz(Account): __author_name__ = ("mkaay") __author_mail__ = ("mkaay@mkaay.de") - def getUserAPI(self, user): - req = self.getAccountRequest(user) + def getUserAPI(self, req): src = req.load("http://api.share-online.biz/account.php?username=%s&password=%s&act=userDetails" % (user, self.accounts[user]["password"])) info = {} for line in src.splitlines(): @@ -40,7 +39,7 @@ class ShareonlineBiz(Account): def loadAccountInfo(self, user, req): try: - info = self.getUserAPI(user) + info = self.getUserAPI(req) return {"validuntil": int(info["expire_date"]), "trafficleft": -1, "premium": not info["group"] == "Sammler"} except: pass diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index 0341a98e4..d3136503f 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -116,9 +116,8 @@ class ShareonlineBiz(Hoster): def handleAPIPremium(self): #should be working better self.resumeDownload = True - - pw = self.account.accounts[self.user]["password"] - info = self.account.getUserAPI(self.user) + + info = self.account.getUserAPI(self.req) if info["dl"].lower() == "not_available": self.fail("DL API error") self.req.cj.setCookie("share-online.biz", "dl", info["dl"]) |