This commit is contained in:
nose
2025-12-11 23:21:45 -08:00
parent 16d8a763cd
commit e2ffcab030
44 changed files with 3558 additions and 1793 deletions

View File

@@ -1391,11 +1391,11 @@ class Download_Media(Cmdlet):
media_path = Path(download_result.path)
hash_value = download_result.hash_value or self._compute_file_hash(media_path)
title = info.get("title") or media_path.stem
tags = list(download_result.tags or [])
tag = list(download_result.tag or [])
# Add title tag for searchability
if title and f"title:{title}" not in tags:
tags.insert(0, f"title:{title}")
if title and f"title:{title}" not in tag:
tag.insert(0, f"title:{title}")
# Build a single canonical URL field; prefer yt-dlp provided webpage_url or info.url,
# but fall back to the original requested URL. If multiple unique urls are available,
@@ -1424,7 +1424,7 @@ class Download_Media(Cmdlet):
"hash": hash_value,
"title": title,
"url": final_url,
"tags": tags,
"tag": tag,
"action": "cmdlet:download-media",
# download_mode removed (deprecated), keep media_kind
"store": getattr(opts, "storage_name", None) or getattr(opts, "storage_location", None) or "PATH",