aboutsummaryrefslogtreecommitdiff
path: root/app/ui/hub.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/ui/hub.py')
-rw-r--r--app/ui/hub.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/app/ui/hub.py b/app/ui/hub.py
index b41b369..6a82c83 100644
--- a/app/ui/hub.py
+++ b/app/ui/hub.py
@@ -150,9 +150,10 @@ class _Hub:
no binary) or download its missing models (only once built, so
build > configure > download — Build and Download never appear
together) — heads the menu with a yellow ``[recommended]`` tag,
- separated from the rest by a blank line. The remaining options are
- populated from the detected statuses: configure each installed
- backend, install (backends with nothing on disk), and uninstall.
+ separated from the rest by a blank line. remaining actions are populated from the detected statuses:
+ configure each configurable backend (qwen asks nothing to
+ configure, so it has no entry), install (backends with nothing on
+ disk), and uninstall.
Selecting one pushes the next screen; Esc pops back to the main
menu. The Build action downloads any missing models alongside the
build (a split view), so it heals a configured-but-unbuilt backend
@@ -197,7 +198,7 @@ class _Hub:
options.append(tui.MENU_SEPARATOR)
options += [(f"Configure {info.label}", ("configure", info.key))
- for info in installed]
+ for info in installed if _configurable(info)]
if any(_installable(info, by_key) for info in REGISTRY):
options.append(("Install Backend", "install"))
if any(_uninstallable(info, by_key) for info in REGISTRY):
@@ -573,6 +574,17 @@ def _server_action_step(spec, action: str):
return taskview.TaskStep(title, work), log_path
+def _configurable(info) -> bool:
+ """True when INFO has a setup wizard worth running to reconfigure.
+
+ qwen-tts is excluded: its wizard asks no questions (ports live in the
+ Settings screen, the speaker is chosen per run on Generate audiobooks),
+ so a "Configure" entry could only ever flash "already installed".
+ Installing it stays possible via Install Backend.
+ """
+ return info.key != "qwen"
+
+
def _installable(info, by_key: dict) -> bool:
"""True when INFO has nothing on disk yet — an install-entry candidate.