This commit is contained in:
2026-03-25 22:39:30 -07:00
parent c31402c8f1
commit 562acd809c
46 changed files with 2367 additions and 1868 deletions

View File

@@ -12,9 +12,9 @@ import time
from urllib.parse import urlparse
from SYS.logger import log, debug
from SYS.item_accessors import get_store_name
from SYS.utils import sha256_file
from . import _shared as sh
from Store import Store
Cmdlet = sh.Cmdlet
CmdletArg = sh.CmdletArg
@@ -153,12 +153,7 @@ def _sanitize_filename(name: str, *, max_len: int = 140) -> str:
def _extract_store_name(item: Any) -> Optional[str]:
try:
store_val = get_field(item, "store")
s = str(store_val or "").strip()
return s if s else None
except Exception:
return None
return get_store_name(item, "store")
def _persist_alt_relationship(
@@ -437,9 +432,11 @@ def _run(result: Any, args: Sequence[str], config: Dict[str, Any]) -> int:
if store_name:
try:
store = Store(config)
if store.is_available(store_name):
backend = store[str(store_name)]
backend, _store_registry, _exc = sh.get_store_backend(
config,
store_name,
)
if backend is not None:
stored_hash = backend.add_file(
Path(str(output_path)),
title=new_title,