update and cleanup repo
This commit is contained in:
@@ -10,7 +10,7 @@ from typing import Any, Callable, Dict, List, Optional, Tuple
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from plugins.tidal.api import (
|
||||
Tidal as TidalApiClient,
|
||||
Tidal,
|
||||
build_track_tags,
|
||||
coerce_duration_seconds,
|
||||
extract_artists,
|
||||
@@ -208,7 +208,7 @@ class Tidal(Provider):
|
||||
self.api_timeout = float(self.config.get("timeout", 10.0))
|
||||
except Exception:
|
||||
self.api_timeout = 10.0
|
||||
self.api_clients = [TidalApiClient(base_url=url, timeout=self.api_timeout) for url in self.api_urls]
|
||||
self.api_clients = [Tidal(base_url=url, timeout=self.api_timeout) for url in self.api_urls]
|
||||
|
||||
def resolve_playback_path(self, item: Any, **_kwargs: Any) -> Optional[str]:
|
||||
return resolve_tidal_manifest_path(item)
|
||||
@@ -960,7 +960,7 @@ class Tidal(Provider):
|
||||
try:
|
||||
table.set_table_metadata(
|
||||
{
|
||||
"provider": "tidal",
|
||||
"plugin": "tidal",
|
||||
"view": "track",
|
||||
"album_id": album_id,
|
||||
"album_title": album_title,
|
||||
@@ -1670,7 +1670,7 @@ class Tidal(Provider):
|
||||
|
||||
return downloaded_count
|
||||
|
||||
def _get_api_client_for_base(self, base_url: str) -> Optional[TidalApiClient]:
|
||||
def _get_api_client_for_base(self, base_url: str) -> Optional[Tidal]:
|
||||
base = base_url.rstrip("/")
|
||||
for client in self.api_clients:
|
||||
if getattr(client, "base_url", "").rstrip("/") == base:
|
||||
@@ -2206,7 +2206,7 @@ class Tidal(Provider):
|
||||
table = Table(f"Tidal Albums: {artist_name}")._perseverance(False)
|
||||
table.set_table("tidal.album")
|
||||
try:
|
||||
table.set_table_metadata({"provider": "tidal", "view": "album", "artist_id": artist_id, "artist_name": artist_name})
|
||||
table.set_table_metadata({"plugin": "tidal", "view": "album", "artist_id": artist_id, "artist_name": artist_name})
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -2268,7 +2268,7 @@ class Tidal(Provider):
|
||||
try:
|
||||
table.set_table_metadata(
|
||||
{
|
||||
"provider": "tidal",
|
||||
"plugin": "tidal",
|
||||
"view": "track",
|
||||
"album_id": album_id,
|
||||
"album_title": album_title,
|
||||
@@ -2338,7 +2338,7 @@ class Tidal(Provider):
|
||||
table = Table("Tidal Track")._perseverance(True)
|
||||
table.set_table("tidal.track")
|
||||
try:
|
||||
table.set_table_metadata({"provider": "tidal", "view": "track", "resolved_manifest": True})
|
||||
table.set_table_metadata({"plugin": "tidal", "view": "track", "resolved_manifest": True})
|
||||
except Exception:
|
||||
pass
|
||||
results_payload: List[Dict[str, Any]] = []
|
||||
|
||||
@@ -320,8 +320,3 @@ class Tidal(API):
|
||||
border_style="cyan",
|
||||
)
|
||||
return res
|
||||
|
||||
|
||||
# Legacy alias for TidalApiClient
|
||||
TidalApiClient = Tidal
|
||||
HifiApiClient = Tidal
|
||||
|
||||
Reference in New Issue
Block a user