Nightly: refactor readability, progress callbacks, and resource handling

This commit is contained in:
2026-02-23 16:47:00 +01:00
parent 7a330c9bc0
commit d414fac022
13 changed files with 668 additions and 455 deletions

View File

@@ -4,7 +4,7 @@
from __future__ import annotations
from abc import ABC, abstractmethod
from typing import Any, Dict, List, Optional, Set, Tuple
from typing import Any, Callable, Dict, List, Optional, Set, Tuple
class BasisPlugin(ABC):
@@ -15,7 +15,11 @@ class BasisPlugin(ABC):
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