Compare commits
3 Commits
v0.1.84.0-
...
v0.1.85.5-
| Author | SHA1 | Date | |
|---|---|---|---|
| 30bafd269c | |||
| 82c90110e4 | |||
| e5d93e3af6 |
@@ -1,3 +1,15 @@
|
||||
## 0.1.85.0-dev - 2026-04-01
|
||||
|
||||
- dev: bump to 0.1.84.5-dev settings.xml auf Kodi 19+ Format (version=1) migriert, Level-Filter fuer Expert/Advanced korrigiert
|
||||
|
||||
## 0.1.84.5-dev - 2026-03-31
|
||||
|
||||
- dev: bump to 0.1.84.0-dev SerienStream Sammlungen mit Poster/Plot, Session-Cache für Sammlungs-URLs
|
||||
|
||||
## 0.1.84.0-dev - 2026-03-16
|
||||
|
||||
- dev: bump to 0.1.83.5-dev Trakt Weiterschauen via watched/shows, Specials überspringen
|
||||
|
||||
## 0.1.83.5-dev - 2026-03-15
|
||||
|
||||
- dev: SerienStream Suche via /suche?term=, Staffel 0 als Filme, Katalog-Suche entfernt
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<addon id="plugin.video.viewit" name="ViewIt" version="0.1.84.0-dev" provider-name="ViewIt">
|
||||
<addon id="plugin.video.viewit" name="ViewIt" version="0.1.85.5-dev" provider-name="ViewIt">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="3.0.0" />
|
||||
<import addon="script.module.requests" />
|
||||
|
||||
@@ -4765,13 +4765,33 @@ def _show_collection_titles_page(plugin_name: str, collection: str, page: int =
|
||||
xbmcplugin.endOfDirectory(handle)
|
||||
return
|
||||
titles = [str(t).strip() for t in titles if t and str(t).strip()]
|
||||
direct_play = bool(plugin_name.casefold() == "einschalten"
|
||||
and _get_setting_bool("einschalten_enable_playback", default=False))
|
||||
for title in titles:
|
||||
_add_directory_item(handle, title, "play_movie" if direct_play else "seasons",
|
||||
{"plugin": plugin_name, "title": title, **_series_url_params(plugin, title)},
|
||||
is_folder=not direct_play)
|
||||
if titles:
|
||||
use_source, show_tmdb, prefer_source = _metadata_policy(
|
||||
plugin_name, plugin, allow_tmdb=_tmdb_list_enabled()
|
||||
)
|
||||
plugin_meta = _collect_plugin_metadata(plugin, titles) if use_source else {}
|
||||
show_plot = _get_setting_bool("tmdb_show_plot", default=True)
|
||||
show_art = _get_setting_bool("tmdb_show_art", default=True)
|
||||
tmdb_prefetched: dict[str, tuple[dict[str, str], dict[str, str], list[TmdbCastMember]]] = {}
|
||||
tmdb_titles = list(titles) if show_tmdb else []
|
||||
if show_tmdb and prefer_source and use_source:
|
||||
tmdb_titles = [
|
||||
t for t in titles
|
||||
if _needs_tmdb((plugin_meta.get(t) or ({},))[0], (plugin_meta.get(t) or ({}, {}))[1],
|
||||
want_plot=show_plot, want_art=show_art)
|
||||
]
|
||||
if show_tmdb and tmdb_titles:
|
||||
with _busy_dialog(f"{collection} wird geladen..."):
|
||||
tmdb_prefetched = _tmdb_labels_and_art_bulk(tmdb_titles)
|
||||
for title in titles:
|
||||
tmdb_info, tmdb_art, tmdb_cast = tmdb_prefetched.get(title, ({}, {}, [])) if show_tmdb else ({}, {}, [])
|
||||
meta = plugin_meta.get(title)
|
||||
info_labels, art, cast = _merge_metadata(title, tmdb_info, tmdb_art, tmdb_cast, meta)
|
||||
info_labels = dict(info_labels or {})
|
||||
info_labels.setdefault("mediatype", "tvshow")
|
||||
_add_directory_item(handle, title, "seasons",
|
||||
{"plugin": plugin_name, "title": title, **_series_url_params(plugin, title)},
|
||||
is_folder=True, info_labels=info_labels, art=art, cast=cast)
|
||||
_add_directory_item(handle, "Naechste Seite", "collection_titles_page",
|
||||
{"plugin": plugin_name, "collection": collection, "page": str(page + 1)}, is_folder=True)
|
||||
xbmcplugin.endOfDirectory(handle)
|
||||
|
||||
@@ -505,6 +505,14 @@ def _strip_tags(value: str) -> str:
|
||||
return re.sub(r"<[^>]+>", " ", value or "")
|
||||
|
||||
|
||||
def _clean_collection_title(title: str) -> str:
|
||||
cleaned = "".join(
|
||||
ch for ch in title
|
||||
if unicodedata.category(ch) not in ("So", "Sm", "Sk", "Sc", "Cs", "Co", "Cn")
|
||||
)
|
||||
return re.sub(r"\s+", " ", cleaned).strip()
|
||||
|
||||
|
||||
def _search_series_api(query: str) -> list[SeriesResult]:
|
||||
query = (query or "").strip()
|
||||
if not query:
|
||||
@@ -1027,6 +1035,8 @@ class SerienstreamPlugin(BasisPlugin):
|
||||
self._latest_hoster_cache: dict[str, list[str]] = {}
|
||||
self._series_metadata_cache: dict[str, tuple[dict[str, str], dict[str, str]]] = {}
|
||||
self._series_metadata_full: set[str] = set()
|
||||
self._collection_url_cache: dict[str, str] = {}
|
||||
self._collection_has_more: bool = False
|
||||
self.is_available = True
|
||||
self.unavailable_reason: str | None = None
|
||||
if not self._requests_available: # pragma: no cover - optional dependency
|
||||
@@ -1251,7 +1261,63 @@ class SerienstreamPlugin(BasisPlugin):
|
||||
|
||||
def capabilities(self) -> set[str]:
|
||||
"""Meldet unterstützte Features für Router-Menüs."""
|
||||
return {"popular_series", "genres", "latest_episodes", "alpha"}
|
||||
return {"popular_series", "genres", "latest_episodes", "alpha", "collections"}
|
||||
|
||||
def collections(self) -> list[str]:
|
||||
"""Liefert Sammlungs-Namen von /sammlungen (Seite 1, für Paginierung)."""
|
||||
return self._collections_page(1)
|
||||
|
||||
def _collections_page(self, page: int = 1) -> list[str]:
|
||||
"""Liefert eine Seite mit Sammlungs-Namen von /sammlungen (paginiert)."""
|
||||
if not self._requests_available:
|
||||
return []
|
||||
base = _get_base_url()
|
||||
names: list[str] = []
|
||||
url_map: dict[str, str] = {}
|
||||
url = f"{base}/sammlungen" if page == 1 else f"{base}/sammlungen?page={page}"
|
||||
soup = _get_soup_simple(url)
|
||||
for a in soup.select('a[href*="/sammlung/"]'):
|
||||
h2 = a.find("h2")
|
||||
if not h2:
|
||||
continue
|
||||
title = _clean_collection_title(h2.get_text(strip=True))
|
||||
href = (a.get("href") or "").strip()
|
||||
if title and href:
|
||||
url_map[title] = _absolute_url(href)
|
||||
names.append(title)
|
||||
if url_map:
|
||||
existing = _session_cache_get("collection_urls")
|
||||
if isinstance(existing, dict):
|
||||
existing.update(url_map)
|
||||
_session_cache_set("collection_urls", existing)
|
||||
else:
|
||||
_session_cache_set("collection_urls", url_map)
|
||||
names.sort(key=lambda t: t.casefold())
|
||||
return names
|
||||
|
||||
def titles_for_collection(self, collection: str, page: int = 1) -> list[str]:
|
||||
"""Liefert Serien-Titel einer Sammlung (paginiert)."""
|
||||
if not self._requests_available:
|
||||
return []
|
||||
url_map = _session_cache_get("collection_urls")
|
||||
if isinstance(url_map, dict):
|
||||
self._collection_url_cache.update(url_map)
|
||||
url = self._collection_url_cache.get(collection)
|
||||
if not url:
|
||||
return []
|
||||
if page > 1:
|
||||
url = f"{url}?page={page}"
|
||||
base_url = self._collection_url_cache[collection]
|
||||
soup = _get_soup_simple(url)
|
||||
titles: list[str] = []
|
||||
for a in soup.select('h6 a[href*="/serie/"]'):
|
||||
title = a.get_text(strip=True)
|
||||
href = (a.get("href") or "").strip()
|
||||
if title and href:
|
||||
self._remember_series_result(title, _absolute_url(href), "")
|
||||
titles.append(title)
|
||||
self._collection_has_more = bool(soup.select(f'a[href*="?page={page + 1}"]'))
|
||||
return titles
|
||||
|
||||
def popular_series(self) -> list[str]:
|
||||
"""Liefert die Titel der beliebten Serien (Quelle: `/beliebte-serien`)."""
|
||||
|
||||
Reference in New Issue
Block a user