Compare commits

...

1 Commits

Author SHA1 Message Date
0a161fd8c6 dev: Trakt-Scrobbling fuer alle Wiedergabe-Pfade 2026-03-11 19:28:21 +01:00
4 changed files with 28 additions and 7 deletions

4
.gitignore vendored
View File

@@ -19,3 +19,7 @@ __pycache__/
# Plugin runtime caches
/addon/plugins/*_cache.json
# Projektdokumentation (lokal)
/PROJECT_INDEX.md
/FUNCTION_MAP.md

View File

@@ -1,3 +1,7 @@
## 0.1.77.5-dev - 2026-03-10
- dev: Max. Eintraege pro Seite Setting pro Plugin
## 0.1.77.0-dev - 2026-03-10
- dev: Changelog-Dialog nur anzeigen wenn Eintrag vorhanden

View File

@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<addon id="plugin.video.viewit" name="ViewIt" version="0.1.77.5-dev" provider-name="ViewIt">
<addon id="plugin.video.viewit" name="ViewIt" version="0.1.78.0-dev" provider-name="ViewIt">
<requires>
<import addon="xbmc.python" version="3.0.0" />
<import addon="script.module.requests" />

View File

@@ -4122,12 +4122,11 @@ def _play_episode(
title_key = (title or "").strip().casefold()
_tmdb_id = _tmdb_cache_get(_TMDB_ID_CACHE, title_key, 0)
_imdb_id = ""
trakt_media: dict[str, object] | None = None
_kind = _tmdb_cache_get(_MEDIA_TYPE_CACHE, title_key, "tv") if _tmdb_id else "tv"
if _tmdb_id:
_kind = _tmdb_cache_get(_MEDIA_TYPE_CACHE, title_key, "tv")
_imdb_id = _fetch_and_cache_imdb_id(title_key, _tmdb_id, _kind)
_set_trakt_ids_property(title, _tmdb_id, _imdb_id)
trakt_media = {
trakt_media: dict[str, object] = {
"title": title, "tmdb_id": _tmdb_id, "imdb_id": _imdb_id, "kind": _kind,
"season": season_number or 0, "episode": episode_number or 0,
}
@@ -4234,6 +4233,19 @@ def _play_episode_url(
if episode_number > 0:
info_labels["episode"] = str(episode_number)
display_title = _label_with_duration(display_title, info_labels)
title_key = (title or "").strip().casefold()
_tmdb_id = _tmdb_cache_get(_TMDB_ID_CACHE, title_key, 0)
_imdb_id = ""
_kind = _tmdb_cache_get(_MEDIA_TYPE_CACHE, title_key, "tv") if _tmdb_id else "tv"
if _tmdb_id:
_imdb_id = _fetch_and_cache_imdb_id(title_key, _tmdb_id, _kind)
_set_trakt_ids_property(title, _tmdb_id, _imdb_id)
trakt_media: dict[str, object] = {
"title": title, "tmdb_id": _tmdb_id, "imdb_id": _imdb_id, "kind": _kind,
"season": season_number or 0, "episode": episode_number or 0,
}
_play_final_link(
final_link,
display_title=display_title,
@@ -4241,6 +4253,7 @@ def _play_episode_url(
art=art,
cast=cast,
resolve_handle=resolve_handle,
trakt_media=trakt_media,
)
_track_playback_and_update_state_async(
_playstate_key(plugin_name=plugin_name, title=title, season=season_label, episode=episode_label)