[mod] add flags to the languages filter

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2022-03-16 18:07:00 +01:00
parent 7625da9fa0
commit 2841abaf55
6 changed files with 139 additions and 78 deletions

View file

@ -85,7 +85,7 @@ class LanguageParser(QueryPartParser):
# check if any language-code is equal with
# declared language-codes
for lc in language_codes:
lang_id, lang_name, country, english_name = map(str.lower, lc)
lang_id, lang_name, country, english_name, _flag = map(str.lower, lc)
# if correct language-code is found
# set it as new search-language
@ -128,7 +128,7 @@ class LanguageParser(QueryPartParser):
for lc in language_codes:
if lc[0] not in settings['search']['languages']:
continue
lang_id, lang_name, country, english_name = map(str.lower, lc)
lang_id, lang_name, country, english_name, _flag = map(str.lower, lc)
# check if query starts with language-id
if lang_id.startswith(value):