From 9a4f077714993bacb4418e7c5b4cb85f5d1601d1 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 21 Jun 2009 18:16:06 +0200 Subject: plugin system changings --- Plugins/Plugin.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'Plugins') 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 -- cgit v1.2.3