From 65cae8a887504f49735aa9035ae53fcffd10fbc9 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Tue, 30 Dec 2025 17:34:13 +0100 Subject: Add textual search Search in titles, subtitles, authors and years. --- src/str_format.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/str_format.py') diff --git a/src/str_format.py b/src/str_format.py index 5d8c412..aaa0440 100644 --- a/src/str_format.py +++ b/src/str_format.py @@ -6,6 +6,9 @@ def safe_path(name): simplified = ''.join([alnum_or_space(c) for c in unaccent(name.lower())]) return '-'.join(simplified.split()) +def for_search(s): + return unaccent(s.lower()) + def unaccent(s): return ''.join(c for c in unicodedata.normalize('NFD', s) if unicodedata.category(c) != 'Mn') -- cgit v1.2.3