diff options
author | mkaay <mkaay@mkaay.de> | 2010-08-07 17:40:43 +0200 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2010-08-07 17:40:43 +0200 |
commit | afb5e3371a9b43dff97131440affcc2c68ec5593 (patch) | |
tree | 7d2c9f1b8a016fc115881d607fcdeb2c12b30703 /module/PluginThread.py | |
parent | hook improvements (diff) | |
download | pyload-afb5e3371a9b43dff97131440affcc2c68ec5593.tar.xz |
file info prefetching (RapidshareCom UploadedTo), download folder fix, SerienjunkiesOrg fix
Diffstat (limited to 'module/PluginThread.py')
-rw-r--r-- | module/PluginThread.py | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/module/PluginThread.py b/module/PluginThread.py index 35ad796b3..d17f638f0 100644 --- a/module/PluginThread.py +++ b/module/PluginThread.py @@ -263,5 +263,38 @@ class HookThread(PluginThread): self.active.finishIfDone() - -
\ No newline at end of file +######################################################################## +class InfoThread(PluginThread): + + #---------------------------------------------------------------------- + def __init__(self, manager): + """Constructor""" + PluginThread.__init__(self, manager) + + self.queue = Queue() # job queue + self.active = False + + self.start() + + #---------------------------------------------------------------------- + def run(self): + """run method""" + + while True: + self.active = self.queue.get() + if self.active == "quit": + return True + pyfile = self.active + + pyfile.plugin.getInfo() + + #---------------------------------------------------------------------- + def put(self, job): + """assing job to thread""" + self.queue.put(job) + + #---------------------------------------------------------------------- + def stop(self): + """stops the thread""" + self.put("quit") + |