Refine title search to whole-word matching and bump 0.1.49
This commit is contained in:
@@ -106,10 +106,8 @@ def _matches_query(query: str, *, title: str, description: str) -> bool:
|
||||
normalized_query = _normalize_search_text(query)
|
||||
if not normalized_query:
|
||||
return False
|
||||
haystack = _normalize_search_text(title)
|
||||
if not haystack:
|
||||
return False
|
||||
return normalized_query in haystack
|
||||
haystack = f" {_normalize_search_text(title)} "
|
||||
return f" {normalized_query} " in haystack
|
||||
|
||||
|
||||
def _strip_der_film_suffix(title: str) -> str:
|
||||
|
||||
Reference in New Issue
Block a user