diff options
| author | historia <historiavg@proton.me> | 2026-08-25 20:35:05 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-08-25 20:35:05 -0400 |
| commit | f3f7bb98e4bc969a17fba71294177819fbbbd070 (patch) | |
| tree | 52fbe497a47eb92314ea57893d80eaeff652118b /app/ui/hub.py | |
| parent | ca3c78ef577f5d8435dd10db0296c3e2fd8e69e2 (diff) | |
| download | tts-audiobook-generator-f3f7bb98e4bc969a17fba71294177819fbbbd070.tar.gz | |
feat: rename convert to generate, line up model menu options
Diffstat (limited to 'app/ui/hub.py')
| -rw-r--r-- | app/ui/hub.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/ui/hub.py b/app/ui/hub.py index a8c167e..1eef63b 100644 --- a/app/ui/hub.py +++ b/app/ui/hub.py @@ -122,7 +122,7 @@ class _Hub: # configuring one and starting/stopping its servers need it on # this machine. if any(st.installed or st.running for st in statuses): - options.insert(0, ("Convert books", "convert")) + options.insert(0, ("Generate audiobooks", "convert")) if any(st.installed for st in statuses): options.append(("Start/Stop Backend Servers", "server")) options.append(("Settings", "settings")) @@ -348,7 +348,7 @@ class _Hub: return tui.Wizard.BACK fields, builders, statuses = prepared while True: - result = tui.form(self.stdscr, "Convert books", fields, + result = tui.form(self.stdscr, "Generate audiobooks", fields, buttons=("Generate!", "Cancel"), start_on_buttons=True, back_value=tui.Wizard.BACK) @@ -1011,12 +1011,15 @@ def _audiocpp_fields(stdscr, api_url: Optional[str] = None) -> Optional[tuple]: initial = voices_for(default_model) initial_voice = initial[0] if initial else "" + # The Model picker reads as a two-column table: pad every id to the + # widest one so the (type) column starts on the same position. + id_width = max(len(entry.get("id") or "") for entry in models) + def _label(entry: dict) -> str: capability = audiocpp_entry_voice_capability( entry.get("family") or "", entry.get("task") or "tts", entry.get("id") or "") - return (f"{entry.get('id')} ({entry.get('family') or '?'}, " - f"{capability})") + return f"{entry.get('id') or '':<{id_width}} ({capability})" fields = [ {"key": "model_id", "label": "Model", "kind": "choice", |
