diff options
author | Alexandre Flament <alex@al-f.net> | 2021-05-28 18:45:22 +0200 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2021-06-01 08:10:15 +0200 |
commit | 4b07df62e5906e98315e9e856db8f39b2f28f36e (patch) | |
tree | 8ab5a8d8e012aabfe55d01f3157ec7bff897c8d3 /searx/plugins | |
parent | 856729226d5822a3285483689f9f8ba5c2bafc07 (diff) | |
download | searxng-4b07df62e5906e98315e9e856db8f39b2f28f36e.tar.gz searxng-4b07df62e5906e98315e9e856db8f39b2f28f36e.zip |
[mod] move all default settings into searx.settings_defaults
Diffstat (limited to 'searx/plugins')
-rw-r--r-- | searx/plugins/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/searx/plugins/__init__.py b/searx/plugins/__init__.py index 5e2829201..22f475875 100644 --- a/searx/plugins/__init__.py +++ b/searx/plugins/__init__.py @@ -21,7 +21,7 @@ from os import listdir, makedirs, remove, stat, utime from os.path import abspath, basename, dirname, exists, join from shutil import copyfile -from searx import logger, settings, static_path +from searx import logger, settings logger = logger.getChild('plugins') @@ -123,7 +123,7 @@ def sync_resource(base_path, resource_path, name, target_dir, plugin_dir): def prepare_package_resources(pkg, name): plugin_dir = 'plugin_' + name - target_dir = join(static_path, 'plugins/external_plugins', plugin_dir) + target_dir = join(settings['ui']['static_path'], 'plugins/external_plugins', plugin_dir) try: makedirs(target_dir, exist_ok=True) except: @@ -170,10 +170,10 @@ plugins.register(search_on_category_select) plugins.register(tracker_url_remover) plugins.register(vim_hotkeys) # load external plugins -if 'plugins' in settings: +if settings['plugins']: plugins.register(*settings['plugins'], external=True) -if 'enabled_plugins' in settings: +if settings['enabled_plugins']: for plugin in plugins: if plugin.name in settings['enabled_plugins']: plugin.default_on = True @@ -181,5 +181,5 @@ if 'enabled_plugins' in settings: plugin.default_on = False # load tor specific plugins -if settings['outgoing'].get('using_tor_proxy'): +if settings['outgoing']['using_tor_proxy']: plugins.register(ahmia_filter) |