This commit is contained in:
2026-01-16 20:08:22 -08:00
parent 385307c5b9
commit a4d44e6190
3 changed files with 72 additions and 9 deletions

View File

@@ -1289,7 +1289,44 @@ class Tidal(Provider):
return False, None
if downloaded:
return True, downloaded
meta = None
try:
if isinstance(getattr(result, "full_metadata", None), dict):
meta = dict(result.full_metadata)
except Exception:
meta = None
if meta is None and isinstance(detail, dict):
meta = dict(detail)
title_hint = None
try:
title_hint = str(getattr(result, "title", "") or "").strip()
except Exception:
title_hint = None
if not title_hint or title_hint.lower().startswith("track "):
if isinstance(meta, dict):
title_hint = stringify(meta.get("title")) or title_hint
tags_hint: Optional[List[str]] = None
try:
tags_val = getattr(result, "tag", None)
if isinstance(tags_val, (set, list, tuple)):
tags_hint = [str(t) for t in tags_val if t]
except Exception:
tags_hint = None
if not tags_hint and isinstance(meta, dict):
try:
tags_hint = [str(t) for t in build_track_tags(meta) if t]
except Exception:
tags_hint = None
return True, {
"path": str(downloaded),
"title": title_hint,
"tags": tags_hint,
"full_metadata": meta,
"media_kind": "audio",
}
return False, None
if view == "album":