Implement ViewIt Plugin System Documentation and Update Project Notes

- Added comprehensive documentation for the ViewIt Plugin System, detailing the plugin loading process, required methods, optional features, and community extension workflow.
- Updated project notes to reflect the current structure, build process, search logic, and known issues.
- Introduced new build scripts for installing the add-on and creating ZIP packages.
- Added test scripts for TMDB API integration, including argument parsing and logging functionality.
- Enhanced existing plugins with improved search logic and error handling.
This commit is contained in:
2026-02-01 17:55:30 +01:00
commit ee275bee47
62 changed files with 16356 additions and 0 deletions

55
addon/plugin_interface.py Normal file
View File

@@ -0,0 +1,55 @@
#!/usr/bin/env python3
"""Gemeinsame Schnittstelle fuer Kodi-Plugins."""
from __future__ import annotations
from abc import ABC, abstractmethod
from typing import List, Optional, Set
class BasisPlugin(ABC):
"""Abstrakte Basisklasse fuer alle Integrationen."""
name: str
@abstractmethod
async def search_titles(self, query: str) -> List[str]:
"""Liefert eine Liste aller Treffer fuer die Suche."""
@abstractmethod
def seasons_for(self, title: str) -> List[str]:
"""Liefert alle Staffeln zu einem Titel."""
@abstractmethod
def episodes_for(self, title: str, season: str) -> List[str]:
"""Liefert alle Folgen zu einer Staffel."""
def stream_link_for(self, title: str, season: str, episode: str) -> Optional[str]:
"""Optional: Liefert den Stream-Link fuer eine konkrete Folge."""
return None
def resolve_stream_link(self, link: str) -> Optional[str]:
"""Optional: Folgt einem Stream-Link und liefert die finale URL."""
return None
def genres(self) -> List[str]:
"""Optional: Liefert eine Liste an Genres (falls verfügbar)."""
return []
def titles_for_genre(self, genre: str) -> List[str]:
"""Optional: Liefert alle Serientitel zu einem Genre."""
return []
def capabilities(self) -> Set[str]:
"""Optional: Liefert eine Menge an Features/Capabilities dieses Plugins.
Beispiele:
- `popular_series`: Plugin kann eine Liste beliebter Serien liefern.
"""
return set()
def popular_series(self) -> List[str]:
"""Optional: Liefert eine Liste beliebter Serien (als Titel-Strings)."""
return []