df
This commit is contained in:
@@ -244,7 +244,7 @@ class SharedArgs:
|
||||
description="Destination location",
|
||||
)
|
||||
|
||||
DELETE_FLAG = CmdletArg(
|
||||
DELETE = CmdletArg(
|
||||
"delete",
|
||||
type="flag",
|
||||
description="Delete the file and its .tag after successful operation.",
|
||||
@@ -2081,6 +2081,12 @@ def extract_url_from_result(result: Any) -> list[str]:
|
||||
_extend(result.metadata.get("url"))
|
||||
_extend(result.metadata.get("url"))
|
||||
_extend(result.metadata.get("url"))
|
||||
if isinstance(getattr(result, "full_metadata", None), dict):
|
||||
fm = getattr(result, "full_metadata", None)
|
||||
if isinstance(fm, dict):
|
||||
_extend(fm.get("url"))
|
||||
_extend(fm.get("url"))
|
||||
_extend(fm.get("url"))
|
||||
elif hasattr(result, "url") or hasattr(result, "url"):
|
||||
# Handle objects with url/url attribute
|
||||
_extend(getattr(result, "url", None))
|
||||
@@ -2090,6 +2096,11 @@ def extract_url_from_result(result: Any) -> list[str]:
|
||||
_extend(result.get("url"))
|
||||
_extend(result.get("url"))
|
||||
_extend(result.get("url"))
|
||||
fm = result.get("full_metadata")
|
||||
if isinstance(fm, dict):
|
||||
_extend(fm.get("url"))
|
||||
_extend(fm.get("url"))
|
||||
_extend(fm.get("url"))
|
||||
extra = result.get("extra")
|
||||
if isinstance(extra, dict):
|
||||
_extend(extra.get("url"))
|
||||
@@ -2531,6 +2542,30 @@ def resolve_tidal_manifest_path(item: Any) -> Optional[str]:
|
||||
metadata["_tidal_track_details_fetched"] = True
|
||||
except Exception:
|
||||
pass
|
||||
if not metadata.get("url"):
|
||||
try:
|
||||
resp_info = httpx.get(
|
||||
"https://tidal-api.binimum.org/info/",
|
||||
params={"id": str(track_int)},
|
||||
timeout=10.0,
|
||||
)
|
||||
resp_info.raise_for_status()
|
||||
info_payload = resp_info.json()
|
||||
info_data = info_payload.get("data") if isinstance(info_payload, dict) else None
|
||||
if isinstance(info_data, dict) and info_data:
|
||||
try:
|
||||
for k, v in info_data.items():
|
||||
if k not in metadata:
|
||||
metadata[k] = v
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
if info_data.get("url"):
|
||||
metadata["url"] = info_data.get("url")
|
||||
except Exception:
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user