diff options
author | Adam Tauber <asciimoo@gmail.com> | 2020-10-09 14:11:19 +0200 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2020-10-09 14:12:31 +0200 |
commit | a05c660e3036ad8d02072fc6731af54c2ed6151c (patch) | |
tree | 5876484acd3e7f367975fffdd136f9adf12d1c99 /searx/plugins | |
parent | 830a2e5b93ef5597cddf03b51514d0e526d881cb (diff) | |
download | searxng-a05c660e3036ad8d02072fc6731af54c2ed6151c.tar.gz searxng-a05c660e3036ad8d02072fc6731af54c2ed6151c.zip |
[enh] add ability to set enabled plugins from settings - closes #1613 #778
Diffstat (limited to 'searx/plugins')
-rw-r--r-- | searx/plugins/__init__.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/searx/plugins/__init__.py b/searx/plugins/__init__.py index 51f6981a2..2f02e224f 100644 --- a/searx/plugins/__init__.py +++ b/searx/plugins/__init__.py @@ -172,3 +172,10 @@ plugins.register(vim_hotkeys) # load external plugins if 'plugins' in settings: plugins.register(*settings['plugins'], external=True) + +if 'enabled_plugins' in settings: + for plugin in plugins: + if plugin.name in settings['enabled_plugins']: + plugin.default_on = True + else: + plugin.default_on = False |