diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-06-21 18:16:06 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-06-21 18:16:06 +0200 |
commit | 9a4f077714993bacb4418e7c5b4cb85f5d1601d1 (patch) | |
tree | 86e6951c572f3d1602872c6eb654d79a8e0dce99 /Plugins/Plugin.py | |
parent | fixed no url return bug (diff) | |
download | pyload-9a4f077714993bacb4418e7c5b4cb85f5d1601d1.tar.xz |
plugin system changings
Diffstat (limited to 'Plugins/Plugin.py')
-rw-r--r-- | Plugins/Plugin.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Plugins/Plugin.py b/Plugins/Plugin.py index ba3ee29b3..2f13d3c43 100644 --- a/Plugins/Plugin.py +++ b/Plugins/Plugin.py @@ -43,6 +43,25 @@ class Plugin(): self.want_reconnect = False self.multi_dl = True self.ocr = None #captcha reader instance + + def prepare(self, thread): + pyfile = self.parent + + self.want_reconnect = False + + pyfile.status.exists = self.file_exists() + + if not pyfile.status.exists: + raise Exception, "The file was not found on the server." + + 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) + def set_parent_status(self): """ sets all available Statusinfos about a File in self.parent.status |