diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-01-07 23:58:28 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-01-07 23:58:28 +0100 |
commit | 6eaa7bb25e2254c80c43fe46166142d590e86c64 (patch) | |
tree | 103b12d2f8ca59cf84c7511018d99c3cb651839f /module/threads/InfoThread.py | |
parent | xfilesharingpro - fix patterns (diff) | |
download | pyload-6eaa7bb25e2254c80c43fe46166142d590e86c64.tar.xz |
some cleanups
Diffstat (limited to 'module/threads/InfoThread.py')
-rw-r--r-- | module/threads/InfoThread.py | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/module/threads/InfoThread.py b/module/threads/InfoThread.py index c1e4458ef..5f21d487c 100644 --- a/module/threads/InfoThread.py +++ b/module/threads/InfoThread.py @@ -5,9 +5,8 @@ from time import time from traceback import print_exc from module.Api import OnlineStatus -from module.PyFile import PyFile from module.common.packagetools import parseNames -from module.utils import has_method +from module.utils import has_method, accumulate from BaseThread import BaseThread @@ -29,16 +28,9 @@ class InfoThread(BaseThread): def run(self): """run method""" - plugins = {} + plugins = accumulate(self.data) crypter = {} - for url, plugin in self.data: - if plugin in plugins: - plugins[plugin].append(url) - else: - plugins[plugin] = [url] - - # filter out crypter plugins for name in self.m.core.pluginManager.getPlugins("crypter"): if name in plugins: @@ -68,11 +60,7 @@ class InfoThread(BaseThread): self.m.log.error("Could not decrypt container.") data = [] - for url, plugin in data: - if plugin in plugins: - plugins[plugin].append(url) - else: - plugins[plugin] = [url] + accumulate(data, plugins) self.m.infoResults[self.rid] = {} |