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