mirror of
https://github.com/searxng/searxng.git
synced 2026-06-16 06:46:52 +02:00
[chore] complete and normalize the attributes of engine objects (#6258)
Drop outdated engine attributes: supported_languages, language_aliases Complete, normalize and document the type definitions for the engine-module and engine-class. For the ``engine.about`` section of the configuration, a type check is performed based on structure ``searx.enginelib.EngineAbout``. The property ``engine.about.language`` no longer exists; existing values have been migrated to ``engine.language``. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
committed by
Markus Heiser
parent
b3e08f2a44
commit
6c9dcd4242
+3
-4
@@ -1075,10 +1075,9 @@ def engine_descriptions():
|
||||
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"]
|
||||
for eng_name, eng_obj in engines.items():
|
||||
if eng_obj.about.description:
|
||||
result[eng_name] = [eng_obj.about.description, "SearXNG config"]
|
||||
|
||||
return jsonify(result)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user