diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-06-12 18:07:20 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-06-12 18:07:20 +0200 |
commit | f570bef8707ccb15aa859ac06faf2fe5b652fb70 (patch) | |
tree | c94f274809369ccb06c92c0e6a16279477ec0e6f /module | |
parent | fixes just_header (diff) | |
download | pyload-f570bef8707ccb15aa859ac06faf2fe5b652fb70.tar.xz |
ul fix
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/accounts/UploadedTo.py | 7 | ||||
-rw-r--r-- | module/plugins/hoster/UploadedTo.py | 2 | ||||
-rw-r--r-- | module/setup.py | 5 |
3 files changed, 8 insertions, 6 deletions
diff --git a/module/plugins/accounts/UploadedTo.py b/module/plugins/accounts/UploadedTo.py index 6852e5243..0bc7c2fd0 100644 --- a/module/plugins/accounts/UploadedTo.py +++ b/module/plugins/accounts/UploadedTo.py @@ -37,17 +37,18 @@ class UploadedTo(Account): premium = '<a href="me#premium"><em>Premium</em>' in html or '<em>Premium</em></th>' in html if premium: - #raw_traffic = re.search(r'<th colspan="2"><b class="cB">([^<]+)', html).group(1) + raw_traffic = re.search(r'<th colspan="2"><b class="cB">([^<]+)', html).group(1) raw_valid = re.search(r"<td>Duration:</td>\s*<th>([^<]+)", html, re.MULTILINE).group(1).strip() + traffic = int(self.parseTraffic(raw_traffic)) + if raw_valid == "unlimited": validuntil = -1 else: raw_valid = re.findall(r"\d+", raw_valid) validuntil = time() + 24 * 60 * 60 * int(raw_valid[0]) + 60 * 60 * int(raw_valid[1]) - - return {"validuntil":validuntil, "trafficleft": -1} + return {"validuntil":validuntil, "trafficleft":traffic, "maxtraffic":50*1024*1024} else: return {"premium" : False, "validuntil" : -1} diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index c1b3b9d05..c698800ec 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -116,7 +116,7 @@ class UploadedTo(Hoster): self.log.debug("%(name)s: Use Premium Account (%(left)sGB left)" % {"name" :self.__name__, "left" : info["trafficleft"]/1024/1024}) if int(self.data[1])/1024 > info["trafficleft"]: self.log.info(_("%s: Not enough traffic left" % self.__name__)) - self.account.empty() + self.account.empty(self.user) self.resetAccount() self.fail(_("Traffic exceeded")) diff --git a/module/setup.py b/module/setup.py index 367fc7c52..b865716cc 100644 --- a/module/setup.py +++ b/module/setup.py @@ -41,8 +41,9 @@ class Setup(): def start(self): - - lang = self.ask(u"Choose your Language / Wähle deine Sprache", "en", ["en", "de","it","pl", "fr", "cs", "es"]) + + langs = self.config.getMetaData("general", "language")["type"].split(";") + lang = self.ask(u"Choose your Language / Wähle deine Sprache", "en", langs) translation = gettext.translation("setup", join(self.path, "locale"), languages=["en", lang]) translation.install(True) |