From a29d7508eca14e4bc86c2e9df65b120d30be9e14 Mon Sep 17 00:00:00 2001 From: Nose Date: Wed, 4 Mar 2026 18:22:35 -0800 Subject: [PATCH] update --- SYS/optional_deps.py | 5 ++++- cmdlet/add_file.py | 10 +++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/SYS/optional_deps.py b/SYS/optional_deps.py index 725d045..6c04553 100644 --- a/SYS/optional_deps.py +++ b/SYS/optional_deps.py @@ -44,7 +44,10 @@ _FLORENCEVISION_DEPENDENCIES: List[Tuple[str, str]] = [ ] _PROVIDER_DEPENDENCIES: Dict[str, List[Tuple[str, str]]] = { - "telegram": [("telethon", "telethon>=1.36.0")], + "telegram": [ + ("telethon", "telethon>=1.36.0"), + ("cryptg", "cryptg"), + ], "soulseek": [("aioslsk", "aioslsk>=1.6.0")], } diff --git a/cmdlet/add_file.py b/cmdlet/add_file.py index b4fb8cc..ac41b84 100644 --- a/cmdlet/add_file.py +++ b/cmdlet/add_file.py @@ -1150,18 +1150,18 @@ class Add_File(Cmdlet): Returns (media_path, file_hash, temp_dir_to_cleanup). """ - # PRIORITY 1a: Try hash+path from directory scan result + # PRIORITY 1a: Prefer an explicit local path when it exists. + # This avoids unnecessary backend.get_file(hash) probes (and remote fallbacks) + # for freshly downloaded temp files that are not yet present in the source store. if isinstance(result, dict): r_path = result.get("path") r_hash = result.get("hash") - r_store = result.get("store") - # If we have path+hash but no store, it's likely a dir scan result - if r_path and r_hash and not r_store: + if r_path: try: p = coerce_to_path(r_path) if p.exists() and p.is_file(): pipe_obj.path = str(p) - return p, str(r_hash), None + return p, str(r_hash) if r_hash else None, None except Exception: pass