Merge pull request #811 from return42/enh-788

[mod] configuration to overwrite engine description
This commit is contained in:
Alexandre Flament 2022-01-25 06:55:12 +01:00 committed by GitHub
commit 81453a0eba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -1170,6 +1170,13 @@ def engine_descriptions():
if isinstance(description, str): if isinstance(description, str):
description = [description, 'wikipedia'] description = [description, 'wikipedia']
result[engine] = description result[engine] = description
# overwrite by about:description (from settings)
for engine_name, engine_mod in engines.items():
descr = getattr(engine_mod, 'about', {}).get('description', None)
if descr is not None:
result[engine_name] = [descr, "SearXNG config"]
return jsonify(result) return jsonify(result)