summaryrefslogtreecommitdiffstats
path: root/module/ThreadManager.py
diff options
context:
space:
mode:
authorGravatar Jeix <devnull@localhost> 2010-06-20 13:07:24 +0200
committerGravatar Jeix <devnull@localhost> 2010-06-20 13:07:24 +0200
commit29241018fe7338a88d01a0c37f0a3f9e45b8d6f3 (patch)
treea83d47660de94bb79cfaf2f0ac2c6ac618a5d061 /module/ThreadManager.py
parentDebug = False is the better choice as default (diff)
downloadpyload-29241018fe7338a88d01a0c37f0a3f9e45b8d6f3.tar.xz
Package_finished event for scripts implemented
bugfix: closing socket for IRC connection (xdcc)
Diffstat (limited to 'module/ThreadManager.py')
-rw-r--r--module/ThreadManager.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/module/ThreadManager.py b/module/ThreadManager.py
index 307728fb3..1c5a89a5c 100644
--- a/module/ThreadManager.py
+++ b/module/ThreadManager.py
@@ -179,7 +179,16 @@ class ThreadManager(Thread):
#~ pyfile.packager.pullOutPackage(pyfile.package.id)
#~ pyfile.packager.addFileToPackage(pyfile.package.id, pyfile.collector.popFile(id))
else:
+ packFinished = True
+ for packfile in pyfile.package.files:
+ if packfile.status.type != "finished":
+ packFinished = False
+ break
+
self.parent.logger.info(_("Download finished: %s") % pyfile.url)
+ if packFinished:
+ self.parent.logger.info(_("Package finished: %s") % pyfile.package.data['package_name'])
+ self.parent.hookManager.packageFinished(pyfile.package)
elif pyfile.status.type == "reconnected":
pyfile.plugin.req.init_curl()