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

@@ -27,6 +27,7 @@ else:
from plugin_interface import BasisPlugin
from plugin_helpers import dump_response_html, get_setting_bool, get_setting_string, log_error, log_url, notify_url
from search_utils import matches_query as _shared_matches_query, normalize_search_text as _shared_normalize_search_text
from http_session_pool import get_requests_session
if TYPE_CHECKING: # pragma: no cover
@@ -106,18 +107,11 @@ def _absolute_url(url: str) -> str:
def _normalize_search_text(value: str) -> str:
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) -> 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
return _shared_matches_query(query, title=title)
def _is_probably_content_url(url: str) -> bool: