From f22b9cebe1f800127658f94b9e4c9b9b2481c59e Mon Sep 17 00:00:00 2001 From: spoob Date: Mon, 16 Nov 2009 20:28:33 +0100 Subject: Fixed DLC Plugin --- module/plugins/DLC.pyc | Bin 2228 -> 2231 bytes pyLoadCore.py | 11 +++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/module/plugins/DLC.pyc b/module/plugins/DLC.pyc index 3adddec00..980dd8ace 100644 Binary files a/module/plugins/DLC.pyc and b/module/plugins/DLC.pyc differ diff --git a/pyLoadCore.py b/pyLoadCore.py index d84353902..94a57aa70 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -147,10 +147,13 @@ class Core(object): for file_handler in glob(self.plugin_folder + sep + '*.py') + glob(self.plugin_folder + sep + 'DLC.pyc'): plugin_pattern = "" plugin_file = basename(file_handler).replace('.pyc', '').replace('.py', '') - for line in open(file_handler, "r").readlines(): - if "props['pattern']" in line: - plugin_pattern = line.split("r\"")[1].split("\"")[0] - break + if plugin_file == "DLC": + 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(plugin_file + _(" added")) -- cgit v1.2.3