From 544486a374cd5cae7acce1302648d8dad079db48 Mon Sep 17 00:00:00 2001 From: historia Date: Wed, 26 Aug 2026 18:18:21 -0400 Subject: fix: default directory when choosing voices in tui --- app/ui/hub.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'app/ui/hub.py') 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. -- cgit v1.2.3