kk
This commit is contained in:
@@ -663,8 +663,9 @@ class search_file(Cmdlet):
|
||||
if backend is None:
|
||||
# Last-resort: instantiate full registry for this backend only
|
||||
from Store import Store as _Store
|
||||
_store = _Store(config=config)
|
||||
backend = _store[backend_name]
|
||||
_store = _Store(config=config, suppress_debug=True)
|
||||
if _store.is_available(backend_name):
|
||||
backend = _store[backend_name]
|
||||
except Exception:
|
||||
backend = None
|
||||
if backend is None:
|
||||
@@ -812,8 +813,12 @@ class search_file(Cmdlet):
|
||||
target_backend = get_backend_instance(config, backend_to_search, suppress_debug=True)
|
||||
if target_backend is None:
|
||||
from Store import Store as _Store
|
||||
_store = _Store(config=config)
|
||||
target_backend = _store[backend_to_search]
|
||||
_store = _Store(config=config, suppress_debug=True)
|
||||
if _store.is_available(backend_to_search):
|
||||
target_backend = _store[backend_to_search]
|
||||
else:
|
||||
debug(f"[search-file] Requested backend '{backend_to_search}' not found")
|
||||
return 1
|
||||
except Exception as exc:
|
||||
log(f"Backend '{backend_to_search}' not found: {exc}", file=sys.stderr)
|
||||
db.update_worker_status(worker_id, "error")
|
||||
@@ -838,8 +843,13 @@ class search_file(Cmdlet):
|
||||
backend = get_backend_instance(config, backend_name, suppress_debug=True)
|
||||
if backend is None:
|
||||
from Store import Store as _Store
|
||||
_store = _Store(config=config)
|
||||
backend = _store[backend_name]
|
||||
_store = _Store(config=config, suppress_debug=True)
|
||||
if _store.is_available(backend_name):
|
||||
backend = _store[backend_name]
|
||||
else:
|
||||
# Configured backend name exists but has no registered implementation or failed to load.
|
||||
# (e.g. 'all-debrid' being treated as a store but having no store provider).
|
||||
continue
|
||||
|
||||
searched_backends.append(backend_name)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user