From c6c9904590e8b184af34cedb38d2f63f2cfff2f4 Mon Sep 17 00:00:00 2001 From: RaNaN <Mast3rRaNaN@hotmail.de> Date: Thu, 28 May 2009 15:31:41 +0200 Subject: rapidshare premium support --- Plugins/RapidshareCom.py | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'Plugins/RapidshareCom.py') diff --git a/Plugins/RapidshareCom.py b/Plugins/RapidshareCom.py index 8f774937b..0f4f0528c 100644 --- a/Plugins/RapidshareCom.py +++ b/Plugins/RapidshareCom.py @@ -26,6 +26,12 @@ class RapidshareCom(Plugin): self.time_plus_wait = None #time() + wait in seconds self.want_reconnect = False self.multi_dl = False + + self.read_config() + + if self.config['premium']: + self.multi_dl = True + def set_parent_status(self): """ sets all available Statusinfos about a File in self.parent.status @@ -62,6 +68,10 @@ class RapidshareCom(Plugin): def get_wait_time(self): + if self.config['premium'] == "True": + self.time_plus_wait = 0 + return True + if self.html[1] == None: self.download_serverhtml(self) @@ -94,6 +104,9 @@ class RapidshareCom(Plugin): def get_file_url(self): """ returns the absolute downloadable filepath """ + if self.config['premium'] == True: + return self.parent.url + if self.html[1] == None: self.download_serverhtml() if (self.html_old + 5 * 60) < time(): # nach einiger zeit ist die file_url nicht mehr aktuell @@ -114,10 +127,10 @@ class RapidshareCom(Plugin): else: return self.parent.url - def wait_until(self): - if self.html == None: - self.download_html() - return self.time_plus_wait - - def __call__(self): - return self.props['name'] + def proceed(self, url, location): + + if self.config['premium'] == True: + self.req.add_auth(self.config['user'], self.config['pw']) + + + self.req.download(url, location) -- cgit v1.2.3