removed TUI and others

This commit is contained in:
2026-05-14 20:47:20 -07:00
parent 036977832b
commit 717cb13dda
31 changed files with 378 additions and 7790 deletions
+17 -131
View File
@@ -60,7 +60,6 @@ from SYS.rich_display import (
from cmdnat._status_shared import (
add_startup_check as _shared_add_startup_check,
collect_plugin_startup_checks as _collect_plugin_startup_checks,
has_store_subtype as _has_store_subtype,
has_tool as _has_tool,
)
@@ -94,7 +93,7 @@ from SYS.cmdlet_catalog import (
list_cmdlet_metadata,
list_cmdlet_names,
)
from SYS.config import load_config, resolve_cookies_path
from SYS.config import load_config
from SYS.result_table import Table
from SYS.worker import WorkerManagerRegistry, WorkerStages, WorkerOutputMirror, WorkerStageSession
@@ -2408,7 +2407,7 @@ Come to love it when others take what you share, as there is no greater joy
name: str,
*,
provider: str = "",
store: str = "",
instance: str = "",
files: int | str | None = None,
detail: str = "",
) -> None:
@@ -2417,7 +2416,7 @@ Come to love it when others take what you share, as there is no greater joy
status,
name,
provider=provider,
store=store,
instance=instance,
files=files,
detail=detail,
)
@@ -2439,127 +2438,15 @@ Come to love it when others take what you share, as there is no greater joy
except Exception as exc:
_add_startup_check("DISABLED", "MPV", detail=str(exc))
store_registry = None
if config:
try:
from Store import Store as StoreRegistry
store_registry = StoreRegistry(config=config, suppress_debug=True)
except Exception:
store_registry = None
if _has_store_subtype(config, "hydrusnetwork"):
store_cfg = config.get("store")
hydrus_cfg = (
store_cfg.get("hydrusnetwork",
{}) if isinstance(store_cfg,
dict) else {}
)
if isinstance(hydrus_cfg, dict):
for instance_name, instance_cfg in hydrus_cfg.items():
if not isinstance(instance_cfg, dict):
continue
name_key = str(instance_cfg.get("NAME") or instance_name)
url_val = str(instance_cfg.get("URL") or "").strip()
ok = bool(
store_registry
and store_registry.is_available(name_key)
)
status = "ENABLED" if ok else "DISABLED"
if ok:
total = None
try:
if store_registry:
backend = store_registry[name_key]
total = getattr(backend, "total_count", None)
if total is None:
getter = getattr(
backend,
"get_total_count",
None
)
if callable(getter):
total = getter()
except Exception:
total = None
detail = url_val
files = total if isinstance(
total,
int
) and total >= 0 else None
else:
err = None
if store_registry:
err = store_registry.get_backend_error(
instance_name
) or store_registry.get_backend_error(name_key)
detail = (url_val + (" - " if url_val else "")
) + (err or "Unavailable")
files = None
_add_startup_check(
status,
name_key,
store="hydrusnetwork",
files=files,
detail=detail
)
provider_cfg = None
if isinstance(config, dict):
provider_cfg = config.get("plugin")
if not isinstance(provider_cfg, dict):
provider_cfg = config.get("provider")
if isinstance(provider_cfg, dict) and provider_cfg:
for check in _collect_plugin_startup_checks(config):
_add_startup_check(
str(check.get("status") or "UNKNOWN"),
str(check.get("name") or "Plugin"),
provider=str(check.get("plugin") or ""),
detail=str(check.get("detail") or ""),
files=check.get("files"),
)
if _has_store_subtype(config, "debrid"):
try:
from SYS.config import get_debrid_api_key
from plugins.alldebrid.api import AllDebridClient
api_key = get_debrid_api_key(config)
if not api_key:
_add_startup_check(
"DISABLED",
"Debrid",
store="debrid",
detail="Not configured"
)
else:
client = AllDebridClient(api_key)
base_url = str(getattr(client,
"base_url",
"") or "").strip()
_add_startup_check(
"ENABLED",
"Debrid",
store="debrid",
detail=base_url or "Connected"
)
except Exception as exc:
_add_startup_check(
"DISABLED",
"Debrid",
store="debrid",
detail=str(exc)
)
try:
cookiefile = resolve_cookies_path(config)
if cookiefile is not None:
_add_startup_check("FOUND", "Cookies", detail=str(cookiefile))
else:
_add_startup_check("MISSING", "Cookies", detail="Not found")
except Exception as exc:
_add_startup_check("ERROR", "Cookies", detail=str(exc))
for check in _collect_plugin_startup_checks(config):
_add_startup_check(
str(check.get("status") or "UNKNOWN"),
str(check.get("name") or "Plugin"),
provider=str(check.get("plugin") or ""),
instance=str(check.get("instance") or ""),
detail=str(check.get("detail") or ""),
files=check.get("files"),
)
# Tool checks (configured via [tool=...])
if _has_tool(config, "florencevision"):
@@ -2599,13 +2486,12 @@ Come to love it when others take what you share, as there is no greater joy
provider="tool",
detail=str(exc),
)
if startup_table.rows:
stdout_console().print()
stdout_console().print(startup_table)
except Exception as exc:
if debug_enabled:
debug(f"⚠ Could not check service availability: {exc}")
_add_startup_check("ERROR", "STARTUP", detail=str(exc))
if startup_table.rows:
stdout_console().print()
stdout_console().print(startup_table)
style = Style.from_dict(
{