diff options
author | Jeix <devnull@localhost> | 2011-04-14 20:05:45 +0200 |
---|---|---|
committer | Jeix <devnull@localhost> | 2011-04-14 20:05:45 +0200 |
commit | 5bd7b52cbd35c50e13e3797ab194c1dbb86c2d76 (patch) | |
tree | 186482ebda1416c1c854fe9f387e40f87e179f22 | |
parent | shragle fix (diff) | |
download | pyload-5bd7b52cbd35c50e13e3797ab194c1dbb86c2d76.tar.xz |
Rapidshare fix
-rw-r--r-- | module/plugins/accounts/RapidshareCom.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/RapidshareCom.py | 13 |
2 files changed, 6 insertions, 13 deletions
diff --git a/module/plugins/accounts/RapidshareCom.py b/module/plugins/accounts/RapidshareCom.py index a2bb30211..060424ccc 100644 --- a/module/plugins/accounts/RapidshareCom.py +++ b/module/plugins/accounts/RapidshareCom.py @@ -21,7 +21,7 @@ from module.plugins.Account import Account class RapidshareCom(Account): __name__ = "RapidshareCom" - __version__ = "0.1" + __version__ = "0.2" __type__ = "account" __description__ = """Rapidshare.com account plugin""" __author_name__ = ("mkaay") @@ -42,9 +42,7 @@ class RapidshareCom(Account): k, v = t.split("=") info[k] = v - 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} + tmp = {"validuntil":int(info["billeduntil"]), "trafficleft":-1, "maxtraffic":-1} return tmp diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py index 00561a9ee..d98017d7b 100644 --- a/module/plugins/hoster/RapidshareCom.py +++ b/module/plugins/hoster/RapidshareCom.py @@ -47,7 +47,7 @@ class RapidshareCom(Hoster): __name__ = "RapidshareCom" __type__ = "hoster" __pattern__ = r"http://[\w\.]*?rapidshare.com/(?:files/(?P<id>\d*?)/(?P<name>[^?]+)|#!download\|(?:\w+)\|(?P<id_new>\d+)\|(?P<name_new>[^|]+))" - __version__ = "1.32" + __version__ = "1.33" __description__ = """Rapidshare.com Download Hoster""" __config__ = [["server", "Cogent;Deutsche Telekom;Level(3);Level(3) #2;GlobalCrossing;Level(3) #3;Teleglobe;GlobalCrossing #2;TeliaSonera #2;Teleglobe #2;TeliaSonera #3;TeliaSonera", "Preferred Server", "None"]] __author_name__ = ("spoob", "RaNaN", "mkaay") @@ -135,14 +135,9 @@ class RapidshareCom(Hoster): def handlePremium(self): info = self.account.getAccountInfo(self.user, True) - self.log.debug("%(name)s: Use Premium Account (%(left)sGB left)" % { "name" : self.__name__, "left": info["trafficleft"]/1000/1000 }) - if self.api_data["size"] / 1024 > info["trafficleft"]: - self.log.info(_("%s: Not enough traffic left" % self.__name__)) - self.account.empty() - self.resetAccount() - else: - url = self.api_data["mirror"] - self.download(url, get={"directstart":1}, cookies=True) + self.log.debug("%s: Use Premium Account" % self.__name__) + url = self.api_data["mirror"] + self.download(url, get={"directstart":1}, cookies=True) def download_api_data(self, force=False): |