df
This commit is contained in:
@@ -971,8 +971,18 @@ class search_file(Cmdlet):
|
||||
p_str = str(p_val or "").strip()
|
||||
if p_str:
|
||||
if p_str.startswith(("http://", "https://", "magnet:", "torrent:")):
|
||||
sel_args = ["-url", p_str]
|
||||
sel_action = ["download-file", "-url", p_str]
|
||||
h = normalized.get("hash") or normalized.get("file_hash") or normalized.get("hash_hex")
|
||||
s_val = normalized.get("store")
|
||||
if h and s_val and "/view_file" in p_str:
|
||||
try:
|
||||
h_norm = normalize_hash(h)
|
||||
except Exception:
|
||||
h_norm = str(h)
|
||||
sel_args = ["-query", f"hash:{h_norm}", "-store", str(s_val)]
|
||||
sel_action = ["get-metadata", "-query", f"hash:{h_norm}", "-store", str(s_val)]
|
||||
else:
|
||||
sel_args = ["-url", p_str]
|
||||
sel_action = ["download-file", "-url", p_str]
|
||||
else:
|
||||
try:
|
||||
from SYS.utils import expand_path
|
||||
|
||||
Reference in New Issue
Block a user