on master help sign in
[enh] add ability to set enabled plugins from settings - closes #1613 #778
commita05c660e3036ad8d02072fc6731af54c2ed6151c authorAdam Tauber <asciimoo@gmail.com> dateFri 9 Oct 2020, 14:11 (6 years ago) parent830a2e5
2 files changed+13
searx/plugins/__init__.py+7 searx/settings.yml+6
searx/plugins/__init__.py+7
@@ -172,3 +172,10 @@ plugins.register(vim_hotkeys)
172172# load external plugins
173173if 'plugins' in settings:
174174 plugins.register(*settings['plugins'], external=True)
175+
176+if 'enabled_plugins' in settings:
177+ for plugin in plugins:
178+ if plugin.name in settings['enabled_plugins']:
179+ plugin.default_on = True
180+ else:
181+ plugin.default_on = False
searx/settings.yml+6
@@ -67,6 +67,12 @@ outgoing: # communication with search engines
6767# - plugin2
6868# - ...
6969
70+# uncomment below section if you want to configure which plugin is enabled by default
71+#
72+# enabled_plugins:
73+# - "HTTPS rewrite"
74+# - ...
75+
7076engines:
7177 - name: apk mirror
7278 engine: apkmirror