summaryrefslogtreecommitdiffstats
path: root/module/database/FileDatabase.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-07-10 21:45:09 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-07-10 21:45:09 +0200
commitd0c21a999ba8ddf0c1956415a27f215baa2f727d (patch)
tree07feeb37a12e95b45b91f5e1faaea19d1b5da613 /module/database/FileDatabase.py
parentshow queue in webif (diff)
downloadpyload-d0c21a999ba8ddf0c1956415a27f215baa2f727d.tar.xz
more documentation, some fixes
Diffstat (limited to 'module/database/FileDatabase.py')
-rw-r--r--module/database/FileDatabase.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/module/database/FileDatabase.py b/module/database/FileDatabase.py
index 96b505fe0..3e2f37976 100644
--- a/module/database/FileDatabase.py
+++ b/module/database/FileDatabase.py
@@ -95,8 +95,8 @@ class FileHandler:
data = self.db.getAllLinks(queue)
packs = self.db.getAllPackages(queue)
- data.update([(str(x.id), x.toDbDict()[x.id]) for x in self.cache.itervalues()])
- packs.update([(str(x.id), x.toDict()[x.id]) for x in self.packageCache.itervalues() if x.queue == queue])
+ data.update([(str(x.id), x.toDbDict()[x.id]) for x in self.cache.values()])
+ packs.update([(str(x.id), x.toDict()[x.id]) for x in self.packageCache.values() if x.queue == queue])
for key, value in data.iteritems():
if packs.has_key(str(value["package"])):
@@ -351,9 +351,10 @@ class FileHandler:
"""checks if all files are finished and dispatch event"""
if not self.getQueueCount(True):
- #hope its not called twice
+ #hope its not called together with all DownloadsProcessed
self.core.hookManager.dispatchEvent("allDownloadsProcessed")
self.core.hookManager.dispatchEvent("allDownloadsFinished")
+ self.core.log.debug("All downloads finished")
return True
return False
@@ -365,6 +366,7 @@ class FileHandler:
if not self.db.processcount(1):
self.core.hookManager.dispatchEvent("allDownloadsProcessed")
+ self.core.log.debug("All downloads processed")
return True
return False