summaryrefslogtreecommitdiffstats
path: root/pyLoadCore.py
diff options
context:
space:
mode:
authorGravatar spoob <spoob@gmx.de> 2009-11-16 20:28:33 +0100
committerGravatar spoob <spoob@gmx.de> 2009-11-16 20:28:33 +0100
commit8afd72d4a918108a081a6a94ccc72f4c2d275897 (patch)
tree4454766a420bb152377c36fcfd56dda61bbca21b /pyLoadCore.py
parentFixed DLC Plugin for new Plugin System (diff)
downloadpyload-8afd72d4a918108a081a6a94ccc72f4c2d275897.tar.xz
Fixed DLC Plugin
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-xpyLoadCore.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py
index 920278fe0..a0e645fb2 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -234,12 +234,13 @@ class Core(object):
def create_plugin_index(self):
for file_handler in glob(self.plugin_folder + sep + '*.py') + glob(self.plugin_folder + sep + 'DLC.pyc'):
plugin_file = sub("(\.pyc|\.py)", "", basename(file_handler))
- for line in open(file_handler, "r").readlines():
- if "props['pattern']" in line:
- plugin_pattern = line.split("r\"")[1].split("\"")[0]
- self.plugins_avaible[plugin_file] = plugin_pattern
- self.logger.debug(("%s added") % plugin_file)
- 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
self.logger.info(_("created index of plugins"))
def compare_time(self, start, end):