summaryrefslogtreecommitdiffstats
path: root/Plugins
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-06-22 15:20:14 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-06-22 15:20:14 +0200
commit58de24c63f11f53137fab3854d6324c5a321a37c (patch)
tree5239c6f40b059d5bfd8caae45810e4e01a1494e6 /Plugins
parentsharonline captcha method (diff)
downloadpyload-58de24c63f11f53137fab3854d6324c5a321a37c.tar.xz
reconnect works with new plugin system
Diffstat (limited to 'Plugins')
-rw-r--r--Plugins/Plugin.py4
-rw-r--r--Plugins/RapidshareCom.py32
2 files changed, 26 insertions, 10 deletions
diff --git a/Plugins/Plugin.py b/Plugins/Plugin.py
index 2f13d3c43..c0724c390 100644
--- a/Plugins/Plugin.py
+++ b/Plugins/Plugin.py
@@ -59,9 +59,11 @@ class Plugin():
pyfile.status.waituntil = self.time_plus_wait
pyfile.status.url = self.get_file_url()
pyfile.status.want_reconnect = self.want_reconnect
-
+
+
thread.wait(self.parent)
+ return True
def set_parent_status(self):
""" sets all available Statusinfos about a File in self.parent.status
diff --git a/Plugins/RapidshareCom.py b/Plugins/RapidshareCom.py
index aa6a55f03..20423197b 100644
--- a/Plugins/RapidshareCom.py
+++ b/Plugins/RapidshareCom.py
@@ -30,16 +30,30 @@ class RapidshareCom(Plugin):
if self.config['premium']:
self.multi_dl = True
- def set_parent_status(self):
- """ sets all available Statusinfos about a File in self.parent.status
- """
- if self.html[0] == None:
- self.download_html()
+ def prepare(self, thread):
+ pyfile = self.parent
- self.get_wait_time()
- self.parent.status.filename = self.get_file_name()
- self.parent.status.url = self.get_file_url()
- self.parent.status.waituntil = self.wait_until()
+ self.want_reconnect = False
+
+ self.download_html()
+
+ pyfile.status.exists = self.file_exists()
+
+ if not pyfile.status.exists:
+ raise Exception, "The file was not found on the server."
+
+ self.download_serverhtml()
+
+ pyfile.status.filename = self.get_file_name()
+
+ pyfile.status.waituntil = self.time_plus_wait
+ pyfile.status.url = self.get_file_url()
+ pyfile.status.want_reconnect = self.want_reconnect
+
+
+ thread.wait(self.parent)
+
+ return True
def download_html(self):
""" gets the url from self.parent.url saves html in self.html and parses