update
This commit is contained in:
@@ -44,7 +44,10 @@ _FLORENCEVISION_DEPENDENCIES: List[Tuple[str, str]] = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
_PROVIDER_DEPENDENCIES: Dict[str, 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")],
|
"soulseek": [("aioslsk", "aioslsk>=1.6.0")],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1150,18 +1150,18 @@ class Add_File(Cmdlet):
|
|||||||
|
|
||||||
Returns (media_path, file_hash, temp_dir_to_cleanup).
|
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):
|
if isinstance(result, dict):
|
||||||
r_path = result.get("path")
|
r_path = result.get("path")
|
||||||
r_hash = result.get("hash")
|
r_hash = result.get("hash")
|
||||||
r_store = result.get("store")
|
if r_path:
|
||||||
# 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:
|
|
||||||
try:
|
try:
|
||||||
p = coerce_to_path(r_path)
|
p = coerce_to_path(r_path)
|
||||||
if p.exists() and p.is_file():
|
if p.exists() and p.is_file():
|
||||||
pipe_obj.path = str(p)
|
pipe_obj.path = str(p)
|
||||||
return p, str(r_hash), None
|
return p, str(r_hash) if r_hash else None, None
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user