dev: bump to 0.1.66 and harden resolveurl + serienstream
This commit is contained in:
@@ -31,6 +31,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 search_utils import matches_query as _shared_matches_query, normalize_search_text as _shared_normalize_search_text
|
||||
|
||||
ADDON_ID = "plugin.video.viewit"
|
||||
SETTING_BASE_URL = "einschalten_base_url"
|
||||
@@ -97,18 +98,11 @@ class MovieDetail:
|
||||
|
||||
|
||||
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 _filter_movies_by_title(query: str, movies: List[MovieItem]) -> List[MovieItem]:
|
||||
|
||||
Reference in New Issue
Block a user