main: consolidate integrated changes after v0.1.54
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import List, Optional, Set
|
||||
from typing import Any, Callable, Dict, List, Optional, Set, Tuple
|
||||
|
||||
|
||||
class BasisPlugin(ABC):
|
||||
@@ -12,9 +12,14 @@ class BasisPlugin(ABC):
|
||||
|
||||
name: str
|
||||
version: str = "0.0.0"
|
||||
prefer_source_metadata: bool = False
|
||||
|
||||
@abstractmethod
|
||||
async def search_titles(self, query: str) -> List[str]:
|
||||
async def search_titles(
|
||||
self,
|
||||
query: str,
|
||||
progress_callback: Optional[Callable[[str, Optional[int]], Any]] = None,
|
||||
) -> List[str]:
|
||||
"""Liefert eine Liste aller Treffer fuer die Suche."""
|
||||
|
||||
@abstractmethod
|
||||
@@ -29,6 +34,10 @@ class BasisPlugin(ABC):
|
||||
"""Optional: Liefert den Stream-Link fuer eine konkrete Folge."""
|
||||
return None
|
||||
|
||||
def metadata_for(self, title: str) -> Tuple[Dict[str, str], Dict[str, str], Optional[List[Any]]]:
|
||||
"""Optional: Liefert Info-Labels, Art und Cast fuer einen Titel."""
|
||||
return {}, {}, None
|
||||
|
||||
def resolve_stream_link(self, link: str) -> Optional[str]:
|
||||
"""Optional: Folgt einem Stream-Link und liefert die finale URL."""
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user