update and cleanup repo
This commit is contained in:
@@ -640,8 +640,8 @@ def _run(result: Any, _args: Sequence[str], config: Dict[str, Any]) -> int:
|
||||
except Exception:
|
||||
hydrus_client = None
|
||||
|
||||
# Sidecar/tag import fallback DB root (legacy): if a folder store is selected, use it;
|
||||
# otherwise fall back to configured local storage path.
|
||||
# Use the selected store root when available; otherwise use the configured
|
||||
# local plugin root for sidecar/tag import lookup.
|
||||
from SYS.config import get_local_storage_path
|
||||
|
||||
local_storage_root: Optional[Path] = None
|
||||
@@ -852,8 +852,8 @@ def _run(result: Any, _args: Sequence[str], config: Dict[str, Any]) -> int:
|
||||
"path",
|
||||
None)
|
||||
|
||||
# Legacy LOCAL STORAGE MODE: Handle relationships for local files
|
||||
# (kept as stub - folder store removed)
|
||||
# Handle relationships for local-file results using the configured
|
||||
# local plugin root when available.
|
||||
from SYS.config import get_local_storage_path
|
||||
|
||||
local_storage_path = get_local_storage_path(config) if config else None
|
||||
@@ -869,7 +869,7 @@ def _run(result: Any, _args: Sequence[str], config: Dict[str, Any]) -> int:
|
||||
try:
|
||||
file_path_obj = Path(str(file_path_from_result))
|
||||
except Exception as exc:
|
||||
log(f"Local storage error: {exc}", file=sys.stderr)
|
||||
log(f"Local library error: {exc}", file=sys.stderr)
|
||||
return 1
|
||||
|
||||
if not file_path_obj.exists():
|
||||
@@ -879,12 +879,12 @@ def _run(result: Any, _args: Sequence[str], config: Dict[str, Any]) -> int:
|
||||
if file_path_obj is not None:
|
||||
try:
|
||||
if local_storage_root is None:
|
||||
log("Local storage path unavailable", file=sys.stderr)
|
||||
log("Local plugin path unavailable", file=sys.stderr)
|
||||
return 1
|
||||
|
||||
with LocalLibrarySearchOptimizer(local_storage_root) as opt:
|
||||
if opt.db is None:
|
||||
log("Local storage DB unavailable", file=sys.stderr)
|
||||
log("Local library DB unavailable", file=sys.stderr)
|
||||
return 1
|
||||
|
||||
if king_hash:
|
||||
|
||||
Reference in New Issue
Block a user