diff options
author | mkaay <mkaay@mkaay.de> | 2010-05-05 23:03:43 +0200 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2010-05-05 23:03:43 +0200 |
commit | 81508f295cffc40c479fe72f24bdf1dbbedf5d92 (patch) | |
tree | 0cb68f0a525d0ead0cd8130c3adad150c49b81a7 /pyLoadCore.py | |
parent | megavideo.com plugin (diff) | |
download | pyload-81508f295cffc40c479fe72f24bdf1dbbedf5d92.tar.xz |
refactored plugins, new plugin manager
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-x | pyLoadCore.py | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py index 8fcfa6c82..a777d4a50 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -70,6 +70,7 @@ from module.ThreadManager import ThreadManager from module.CaptchaManager import CaptchaManager from module.HookManager import HookManager from module.PullEvents import PullManager +from module.PluginManager import PluginManager from module.FileList import FileList class Core(object): @@ -408,28 +409,7 @@ class Core(object): execv(executable, [executable, "pyLoadCore.py"]) def create_plugin_index(self): - plugins = glob(join(self.plugin_folder, "hoster", "*.py")) - plugins += glob(join(self.plugin_folder, "decrypter", "*.py")) - plugins += glob(join(self.plugin_folder, "container", "*.py")) - plugins += glob(join(self.plugin_folder, "container", "DLC_*.pyc")) - for file_handler in plugins: - plugin_pattern = "" - plugin_file = sub("(\.pyc|\.py)", "", basename(file_handler)) - if plugin_file.startswith("DLC"): - if plugin_file == "DLC_25" and not version_info < (2, 6): - continue - if plugin_file == "DLC_26" and not version_info > (2, 6): - continue - plugin_pattern = "(?!http://).*\.dlc" - else: - for line in open(file_handler, "r").readlines(): - if "props['pattern']" in line: - plugin_pattern = line.split("r\"")[1].split("\"")[0] - break - if plugin_pattern != "": - self.plugins_avaible[plugin_file] = plugin_pattern - self.logger.debug(_("%s added") % plugin_file) - self.logger.info(_("created index of plugins")) + self.pluginManager = PluginManager(self) def compare_time(self, start, end): |