This commit is contained in:
2026-01-12 04:05:52 -08:00
parent 6076ea307b
commit 9981424397
11 changed files with 646 additions and 682 deletions

View File

@@ -558,15 +558,15 @@ class Folder(Store):
if url:
try:
debug(
f"[Folder.add_file] merging {len(url)} URLs for {file_hash}",
file=sys.stderr,
)
from SYS.metadata import normalize_urls
existing_meta = db.get_metadata(file_hash) or {}
existing_urls = normalize_urls(existing_meta.get("url"))
incoming_urls = normalize_urls(url)
debug(
f"[Folder.add_file] merging {len(incoming_urls)} URLs for {file_hash}: {incoming_urls}",
file=sys.stderr,
)
changed = False
for entry in list(incoming_urls or []):
if not entry:
@@ -580,7 +580,7 @@ class Folder(Store):
{"url": existing_urls},
)
debug(
f"[Folder.add_file] URLs merged for {file_hash}",
f"[Folder.add_file] URLs merged for {file_hash}: {existing_urls}",
file=sys.stderr,
)
except Exception as exc: