diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-07 11:16:06 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-07 11:16:06 +0200 |
commit | 4344fb664864b157ac397ea210a7b34eaf3b275f (patch) | |
tree | e86a558f7cc6a15273b3aa3a0f5d474968316f28 /module/database/FileDatabase.py | |
parent | additional log message (diff) | |
download | pyload-4344fb664864b157ac397ea210a7b34eaf3b275f.tar.xz |
basic event manager
Diffstat (limited to 'module/database/FileDatabase.py')
-rw-r--r-- | module/database/FileDatabase.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/module/database/FileDatabase.py b/module/database/FileDatabase.py index 0ed526240..c77bf5e95 100644 --- a/module/database/FileDatabase.py +++ b/module/database/FileDatabase.py @@ -115,12 +115,14 @@ class FileHandler: @change def addLinks(self, urls, package): """adds links""" - + + self.core.hookManager.dispatchEvent("linksAdded", urls, package) + data = self.core.pluginManager.parseUrls(urls) self.db.addLinks(data, package) self.core.threadManager.createInfoThread(data, package) - + #@TODO change from reloadAll event to package update event self.core.pullManager.addEvent(ReloadAllEvent("collector")) @@ -158,6 +160,7 @@ class FileHandler: self.db.deletePackage(p) self.core.pullManager.addEvent(e) + self.core.hookManager.dispatchEvent("packageDeleted", id) if self.packageCache.has_key(id): del self.packageCache[id] @@ -183,7 +186,7 @@ class FileHandler: del self.cache[id] self.db.deleteLink(f) - + self.core.pullManager.addEvent(e) p = self.getPackage(pid) |