Set title if not set

This commit is contained in:
Tris Forster 2025-09-29 23:40:45 +10:00
parent 894f24f0df
commit 34aa402292

View File

@ -96,6 +96,7 @@ def search(q: str, count: int, page: int):
d = dict(doc)
d["snippets"] = query.getsnippets(doc, ctxwords=20)
d["fpath"] = d["url"][STRIP_CHARS:]
d["title"] = d["title"] or d["filename"]
result["results"].append(d)
return result