aboutsummaryrefslogtreecommitdiff
path: root/app/ui
diff options
context:
space:
mode:
authorhistoria <historiavg@proton.me>2026-08-29 03:10:58 -0400
committerhistoria <historiavg@proton.me>2026-08-29 03:10:58 -0400
commit8a128b3859b8f398e162d3168ff328ab3199d307 (patch)
tree56b36def6f022cc7299acdfd91613a5141b49419 /app/ui
parent83d0b7a5b2f669a1d3a9a0bea9c74b00e0b4c07b (diff)
downloadtts-audiobook-generator-8a128b3859b8f398e162d3168ff328ab3199d307.tar.gz
remove: pointless success flashes in tui for downloads
Diffstat (limited to 'app/ui')
-rw-r--r--app/ui/hub.py29
1 files changed, 13 insertions, 16 deletions
diff --git a/app/ui/hub.py b/app/ui/hub.py
index 74b582f..24c779f 100644
--- a/app/ui/hub.py
+++ b/app/ui/hub.py
@@ -649,10 +649,12 @@ def _download_models_action(stdscr) -> None:
Computes the missing models; when they map to install commands it runs
the downloads in the task view (with real byte progress and cancellation)
- and flashes a result — instead of dropping to the console. When the
- checkout/server.json is missing, nothing is missing, or the models do not
- map to an install command, it flashes an explanatory notice (the latter
- explaining how to install each model by hand).
+ instead of dropping to the console — a successful run returns silently
+ (the view already shows [OK] and waits for a key), and only a cancelled
+ or failed run flashes. When the checkout/server.json is missing, nothing
+ is missing, or the models do not map to an install command, it flashes
+ an explanatory notice (the latter explaining how to install each model
+ by hand).
"""
checkout = audiocpp_backend.find_local_checkout()
if checkout is None:
@@ -683,13 +685,10 @@ def _download_models_action(stdscr) -> None:
rc = taskview.run_steps(stdscr, "Download models",
[taskview.TaskStep("Download missing models",
run)])
- if rc == 0:
- tui.flash(stdscr, "Model download finished. Any warnings were shown "
- "in the log.", "ok")
- elif rc == 130:
+ if rc == 130:
tui.flash(stdscr, "Model download cancelled — re-run it any time.",
"warn")
- else:
+ elif rc:
tui.flash(stdscr, "Some model downloads failed. Re-run 'Download "
"Missing Models' or install them by hand (see the log).",
"err")
@@ -704,8 +703,9 @@ def _update_backends_action(stdscr) -> None:
git fetch + hard reset for the checkouts, with audio.cpp's binary
rebuilt when its checkout moved. A failing backend's step is marked
[FAIL] and the remaining backends still update (the run's exit code
- is the first failure). A flash summarizes the result; the status
- table re-detects when the menu re-shows.
+ is the first failure). A successful run returns silently (the view
+ already shows [OK] and waits for a key); only a cancelled or failed
+ run flashes. The status table re-detects when the menu re-shows.
"""
statuses = detect_all()
by_key = {st.key: st for st in statuses}
@@ -722,13 +722,10 @@ def _update_backends_action(stdscr) -> None:
steps = [taskview.TaskStep(f"Update {info.label}", make_work(info))
for info in targets]
rc = taskview.run_steps(stdscr, "Update Backends", steps)
- if rc == 0:
- tui.flash(stdscr, "Every backend is up to date (or just "
- "updated).", "ok")
- elif rc == 130:
+ if rc == 130:
tui.flash(stdscr, "Update cancelled — re-run 'Update Backends' "
"any time.", "warn")
- else:
+ elif rc:
tui.flash(stdscr, "Some updates did not complete (failed or "
"cancelled) — see the log above. Re-run 'Update "
"Backends' to retry.", "err")