dev: bump to 0.1.66 and harden resolveurl + serienstream

This commit is contained in:
2026-02-25 16:35:16 +01:00
parent 74d15cb25e
commit 73f07d20b4
20 changed files with 522 additions and 232 deletions

View File

@@ -46,6 +46,7 @@ except ImportError: # pragma: no cover - allow running outside Kodi
from plugin_interface import BasisPlugin
from plugin_helpers import dump_response_html, get_setting_bool, log_error, log_url, notify_url
from regex_patterns import DIGITS
from search_utils import matches_query as _shared_matches_query, normalize_search_text as _shared_normalize_search_text
if TYPE_CHECKING: # pragma: no cover
from requests import Session as RequestsSession
@@ -98,24 +99,12 @@ class SearchHit:
def _normalize_search_text(value: str) -> str:
"""Normalisiert Text für robuste, wortbasierte Suche/Filter.
Wir ersetzen Nicht-Alphanumerisches durch Leerzeichen und kollabieren Whitespace.
Dadurch kann z.B. "Star Trek: Lower Decks Der Film" sauber auf Tokens gematcht werden.
"""
value = (value or "").casefold()
value = re.sub(r"[^a-z0-9]+", " ", value)
value = re.sub(r"\s+", " ", value).strip()
return value
return _shared_normalize_search_text(value)
def _matches_query(query: str, *, title: str, description: str) -> bool:
normalized_query = _normalize_search_text(query)
if not normalized_query:
return False
haystack = f" {_normalize_search_text(title)} "
return f" {normalized_query} " in haystack
_ = description
return _shared_matches_query(query, title=title)
def _strip_der_film_suffix(title: str) -> str: