This commit is contained in:
2026-01-15 16:26:22 -08:00
parent dabc8f9d51
commit cb679235bd
7 changed files with 125 additions and 54 deletions

View File

@@ -2736,6 +2736,12 @@ def register_url_with_local_library(
if not storage_path:
return False
# Optimization: Don't open DB if file isn't in library root
try:
path_obj.resolve().relative_to(Path(storage_path).resolve())
except ValueError:
return False
with API_folder_store(storage_path) as db:
file_hash = db.get_file_hash(path_obj)
if not file_hash: