f
This commit is contained in:
@@ -951,7 +951,22 @@ class Download_File(Cmdlet):
|
||||
debug(f"[download-file] Initializing storage interface...")
|
||||
storage = Store(config=config or {}, suppress_debug=True)
|
||||
hydrus_available = bool(is_hydrus_available(config or {}))
|
||||
|
||||
|
||||
# If any Hydrus store backend was successfully initialized in the Store
|
||||
# registry, consider Hydrus available even if the global probe failed.
|
||||
try:
|
||||
from Store.HydrusNetwork import HydrusNetwork as _HydrusStoreClass
|
||||
for bn in storage.list_backends():
|
||||
try:
|
||||
backend = storage[bn]
|
||||
if isinstance(backend, _HydrusStoreClass):
|
||||
hydrus_available = True
|
||||
break
|
||||
except Exception:
|
||||
continue
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if isinstance(config, dict):
|
||||
config["_storage_cache"] = (storage, hydrus_available)
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user