summaryrefslogtreecommitdiff
path: root/searx/plugins
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2020-10-09 14:11:19 +0200
committerAdam Tauber <asciimoo@gmail.com>2020-10-09 14:12:31 +0200
commita05c660e3036ad8d02072fc6731af54c2ed6151c (patch)
tree5876484acd3e7f367975fffdd136f9adf12d1c99 /searx/plugins
parent830a2e5b93ef5597cddf03b51514d0e526d881cb (diff)
downloadsearxng-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__.py7
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