diff options
author | spoob <spoob@gmx.de> | 2010-04-14 14:31:54 +0200 |
---|---|---|
committer | spoob <spoob@gmx.de> | 2010-04-14 14:31:54 +0200 |
commit | c7233c3c1301b47c2574b5baec268ca98529fde7 (patch) | |
tree | f73cd97f1266f342e97e5d4762d2a2ebe7976ac0 | |
parent | Fixed Zippyshare (diff) | |
download | pyload-c7233c3c1301b47c2574b5baec268ca98529fde7.tar.xz |
Fixed Rapidshare
-rw-r--r-- | module/Plugin.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/RapidshareCom.py | 17 | ||||
-rw-r--r-- | module/plugins/hoster/UploadedTo.py | 22 |
3 files changed, 19 insertions, 22 deletions
diff --git a/module/Plugin.py b/module/Plugin.py index 587cbb4f1..fd230c400 100644 --- a/module/Plugin.py +++ b/module/Plugin.py @@ -53,9 +53,9 @@ class Plugin(): self.ocr = None #captcha reader instance self.logger = logging.getLogger("log") self.decryptNow = True + self.pyfile = self.parent def prepare(self, thread): - self.pyfile = self.parent self.want_reconnect = False self.pyfile.status.exists = self.file_exists() diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py index 506cee6c1..45b078275 100644 --- a/module/plugins/hoster/RapidshareCom.py +++ b/module/plugins/hoster/RapidshareCom.py @@ -38,34 +38,33 @@ class RapidshareCom(Plugin): self.start_dl = False def prepare(self, thread): - pyfile = self.parent self.req.clear_cookies() self.no_slots = True self.want_reconnect = False self.download_api_data() if self.api_data["status"] == "1": - pyfile.status.filename = self.get_file_name() + self.pyfile.status.filename = self.get_file_name() if self.config["premium"]: self.logger.info(_("Rapidshare: Use Premium Account (%sGB left)") % (self.props["premkbleft"]/1000000)) - pyfile.status.url = self.parent.url + self.pyfile.status.url = self.parent.url return True self.download_html() while self.no_slots: self.get_wait_time() - pyfile.status.waituntil = self.time_plus_wait - pyfile.status.want_reconnect = self.want_reconnect - thread.wait(pyfile) + self.pyfile.status.waituntil = self.time_plus_wait + self.pyfile.status.want_reconnect = self.want_reconnect + thread.wait(self.pyfile) - pyfile.status.url = self.get_file_url() + self.pyfile.status.url = self.get_file_url() return True elif self.api_data["status"] == "2": self.logger.info(_("Rapidshare: Traffic Share (direct download)")) - pyfile.status.filename = self.get_file_name() - pyfile.status.url = self.parent.url + self.pyfile.status.filename = self.get_file_name() + self.pyfile.status.url = self.parent.url return True else: return False diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index ae9ed0b14..8020b2ba2 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -32,38 +32,36 @@ class UploadedTo(Plugin): self.start_dl = False - def prepare(self, thread): - pyfile = self.parent - + def prepare(self, thread): self.want_reconnect = False tries = 0 - while not pyfile.status.url: + while not self.pyfile.status.url: self.req.clear_cookies() self.download_html() - pyfile.status.exists = self.file_exists() + self.pyfile.status.exists = self.file_exists() - if not pyfile.status.exists: + if not self.pyfile.status.exists: return False self.download_api_data() - pyfile.status.filename = self.get_file_name() + self.pyfile.status.filename = self.get_file_name() if self.config['premium']: - pyfile.status.url = self.parent.url + self.pyfile.status.url = self.parent.url return True self.get_waiting_time() - pyfile.status.waituntil = self.time_plus_wait - pyfile.status.url = self.get_file_url() - pyfile.status.want_reconnect = self.want_reconnect + self.pyfile.status.waituntil = self.time_plus_wait + self.pyfile.status.url = self.get_file_url() + self.pyfile.status.want_reconnect = self.want_reconnect thread.wait(self.parent) - pyfile.status.filename = self.get_file_name() + self.pyfile.status.filename = self.get_file_name() tries += 1 if tries > 5: |