f
This commit is contained in:
@@ -12,10 +12,10 @@ import subprocess
|
||||
from API.HTTP import HTTPClient
|
||||
from ProviderCore.base import SearchResult
|
||||
try:
|
||||
from Provider.HIFI import HIFI
|
||||
from Provider.Tidal import Tidal
|
||||
except ImportError: # pragma: no cover - optional
|
||||
HIFI = None
|
||||
from Provider.tidal_shared import (
|
||||
Tidal = None
|
||||
from API.Tidal import (
|
||||
build_track_tags,
|
||||
extract_artists,
|
||||
stringify,
|
||||
@@ -1426,17 +1426,17 @@ except Exception:
|
||||
# Registry ---------------------------------------------------------------
|
||||
|
||||
class TidalMetadataProvider(MetadataProvider):
|
||||
"""Metadata provider that reuses the HIFI search provider for tidal info."""
|
||||
"""Metadata provider that reuses the Tidal search provider for tidal info."""
|
||||
|
||||
@property
|
||||
def name(self) -> str: # type: ignore[override]
|
||||
return "tidal"
|
||||
|
||||
def __init__(self, config: Optional[Dict[str, Any]] = None) -> None:
|
||||
if HIFI is None:
|
||||
raise RuntimeError("HIFI provider unavailable for tidal metadata")
|
||||
if Tidal is None:
|
||||
raise RuntimeError("Tidal provider unavailable for tidal metadata")
|
||||
super().__init__(config)
|
||||
self._provider = HIFI(self.config)
|
||||
self._provider = Tidal(self.config)
|
||||
|
||||
def search(self, query: str, limit: int = 10) -> List[Dict[str, Any]]:
|
||||
normalized = str(query or "").strip()
|
||||
|
||||
Reference in New Issue
Block a user