This commit is contained in:
2026-01-20 00:31:44 -08:00
parent fcab85455d
commit 1f65f9de2a
5 changed files with 104 additions and 21 deletions

View File

@@ -648,6 +648,34 @@ class Get_Url(Cmdlet):
# Prepare metadata for the detail view
metadata = extract_item_metadata(result)
# Enrich the metadata with tags if missing
if not metadata.get("Tags"):
try:
from cmdlet._shared import get_field
item_tags = get_field(result, "tag") or get_field(result, "tags") or []
row_tags = []
if isinstance(item_tags, list):
row_tags.extend([str(t) for t in item_tags])
elif isinstance(item_tags, str):
row_tags.append(item_tags)
# Also collect from backend
if file_hash and store_name:
try:
# Re-use existing backend variable
if backend and hasattr(backend, "get_tag"):
b_tags, _ = backend.get_tag(file_hash)
if b_tags:
row_tags.extend([str(t) for t in b_tags])
except Exception:
pass
if row_tags:
row_tags = sorted(list(set(row_tags)))
metadata["Tags"] = ", ".join(row_tags)
except Exception:
pass
if file_hash:
metadata["Hash"] = file_hash
if store_name: