Core & Architektur: - Neues Verzeichnis addon/core/ mit router.py, trakt.py, metadata.py, gui.py, playstate.py, plugin_manager.py, updater.py - Tests-Verzeichnis hinzugefügt (24 Tests, pytest + Coverage) Trakt-Integration: - OAuth Device Flow, Scrobbling, Watchlist, History, Calendar - Upcoming Episodes, Weiterschauen (Continue Watching) - Watched-Status in Episodenlisten - _trakt_find_in_plugins() mit 5-Min-Cache Serienstream-Suche: - API-Ergebnisse werden immer mit Katalog-Cache ergänzt (serverseitiges 10-Treffer-Limit) - Katalog-Cache wird beim Addon-Start im Daemon-Thread vorgewärmt - Notification nach Cache-Load via xbmc.executebuiltin() (thread-sicher) Bugfixes (Code-Review): - Race Condition auf _TRAKT_WATCHED_CACHE: _TRAKT_WATCHED_CACHE_LOCK hinzugefügt - GUI-Dialog aus Daemon-Thread: xbmcgui -> xbmc.executebuiltin() - ValueError in Trakt-Watchlist-Routen abgesichert - Token expires_at==0 Check korrigiert - get_setting_bool() Kontrollfluss in gui.py bereinigt - topstreamfilm_plugin: try-finally um xbmcvfs.File.close() Cleanup: - default.py.bak und refactor_router.py entfernt - .gitignore: /tests/ Eintrag entfernt - Type-Hints vereinheitlicht (Dict/List/Tuple -> dict/list/tuple)
29 lines
727 B
Python
29 lines
727 B
Python
from __future__ import annotations
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
ADDON_DIR = ROOT / "addon"
|
|
|
|
if str(ADDON_DIR) not in sys.path:
|
|
sys.path.insert(0, str(ADDON_DIR))
|
|
|
|
|
|
def test_import_core_modules() -> None:
|
|
"""Ein einfacher Smoke-Test, der sicherstellt, dass Kernmodule importierbar sind.
|
|
|
|
Wichtig: Die Module sind so geschrieben, dass sie auch ohne Kodi-Umgebung
|
|
(ohne xbmc/xbmcgui) importiert werden koennen.
|
|
"""
|
|
|
|
import plugin_interface # noqa: F401
|
|
import plugin_helpers # noqa: F401
|
|
import http_session_pool # noqa: F401
|
|
import tmdb # noqa: F401
|
|
import metadata_utils # noqa: F401
|
|
import resolveurl_backend # noqa: F401
|
|
|
|
|