Files
lrx-cli/lrcfetch/fetchers/base.py
T
2026-03-25 05:58:37 +01:00

17 lines
443 B
Python

from abc import ABC, abstractmethod
from typing import Optional
from lrcfetch.models import TrackMeta, LyricResult
class BaseFetcher(ABC):
@property
@abstractmethod
def source_name(self) -> str:
"""Name of the fetcher source."""
pass
@abstractmethod
def fetch(self, track: TrackMeta) -> Optional[LyricResult]:
"""Fetch lyrics for the given track. Returns None if unable to fetch."""
pass