aboutsummaryrefslogtreecommitdiff
path: root/app/backends/__init__.py
diff options
context:
space:
mode:
authorhistoria <historiavg@proton.me>2026-08-24 04:53:43 -0400
committerhistoria <historiavg@proton.me>2026-08-24 04:53:43 -0400
commit0512a932bbf3b87619b6a250f87eb7904d22d1f7 (patch)
treedd2b0eb45823c0690ad2bc86f5aa9be2771f5b17 /app/backends/__init__.py
parent9fb2434dcc8a1ed7bd085b453859d473de64448a (diff)
downloadtts-audiobook-generator-0512a932bbf3b87619b6a250f87eb7904d22d1f7.tar.gz
feat: hide convert/config/start-stop menus if no valid installation
Diffstat (limited to 'app/backends/__init__.py')
-rw-r--r--app/backends/__init__.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/backends/__init__.py b/app/backends/__init__.py
index ed772d4..9facd13 100644
--- a/app/backends/__init__.py
+++ b/app/backends/__init__.py
@@ -55,6 +55,13 @@ class BackendStatus:
start the server, derived from SERVERS by ``format_launch_hint``.
SERVERS is the machine-usable list of server processes the hub can
start/stop (empty when the backend is not yet configured).
+
+ MANAGED says a running server was started by this tool: ``servers``
+ contains a spec whose pid file still names a live process (see
+ ``servers.manages``); when RUNNING but not MANAGED the hub tags the
+ status "[remote]". RUNNING_MODELS names which of a multi-server
+ backend's models answered (qwen: "Base" and/or "CustomVoice"), shown
+ in parentheses in the hub's status table.
"""
key: str
label: str
@@ -64,6 +71,8 @@ class BackendStatus:
details: List[str] = field(default_factory=list)
launch_hint: str = ""
servers: List[ServerSpec] = field(default_factory=list)
+ managed: bool = False
+ running_models: List[str] = field(default_factory=list)
@property
def ready(self) -> bool: