refactor: add is_available method to fetchers

This commit is contained in:
2026-03-31 16:56:49 +02:00
parent 03acda4478
commit d3090ceb1c
9 changed files with 29 additions and 12 deletions
+5
View File
@@ -22,6 +22,11 @@ class BaseFetcher(ABC):
"""True if this fetcher manages its own cache (skip per-source cache check)."""
return False
@abstractmethod
def is_available(self, track: TrackMeta) -> bool:
"""Check if the fetcher is available for the given track (e.g. has required metadata)."""
pass
@abstractmethod
def fetch(
self, track: TrackMeta, bypass_cache: bool = False