s
This commit is contained in:
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user