Browse Source

[mod] /config API : add language_support, paging, safesearch, supported_languages, time_range_support, timeout fields.

Dalf 8 years ago
parent
commit
06bea82935
1 changed files with 10 additions and 1 deletions
  1. 10
    1
      searx/webapp.py

+ 10
- 1
searx/webapp.py View File

@@ -752,7 +752,16 @@ def config():
752 752
                     'engines': [{'name': engine_name,
753 753
                                  'categories': engine.categories,
754 754
                                  'shortcut': engine.shortcut,
755
-                                 'enabled': not engine.disabled}
755
+                                 'enabled': not engine.disabled,
756
+                                 'paging': engine.paging,
757
+                                 'language_support': engine.language_support,
758
+                                 'supported_languages':
759
+                                 engine.supported_languages.keys()
760
+                                 if isinstance(engine.supported_languages, dict)
761
+                                 else engine.supported_languages,
762
+                                 'safesearch': engine.safesearch,
763
+                                 'time_range_support': engine.time_range_support,
764
+                                 'timeout': engine.timeout}
756 765
                                 for engine_name, engine in engines.items()],
757 766
                     'plugins': [{'name': plugin.name,
758 767
                                  'enabled': plugin.default_on}