diff options
| author | historia <historiavg@proton.me> | 2026-08-24 20:41:51 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-08-24 20:41:51 -0400 |
| commit | 610d6828fa8300efa3f8df3d3bf8e3c00e24c1dc (patch) | |
| tree | dd50ad49c0f925361585b7adc7b588ddd203b55e /app/backends/faster.py | |
| parent | cf24fa74188cee498eeb7b94422371c952278d4a (diff) | |
| download | tts-audiobook-generator-610d6828fa8300efa3f8df3d3bf8e3c00e24c1dc.tar.gz | |
remove: partial feature to point at existing backend checkout
Diffstat (limited to 'app/backends/faster.py')
| -rwxr-xr-x | app/backends/faster.py | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/app/backends/faster.py b/app/backends/faster.py index e209ff2..36121ff 100755 --- a/app/backends/faster.py +++ b/app/backends/faster.py @@ -225,30 +225,11 @@ def _wizard(stdscr, args: argparse.Namespace) -> Optional[dict]: wav_start = next(iter(ref_dirs)) s["wav_start"] = wav_start - def screen_install(): - choice = tui.confirm(stdscr, "faster-qwen3-tts is not installed. " - "pip install it now?", default=True, - cancel_value=_GO_BACK) - if choice is _GO_BACK: - return tui.Wizard.BACK - s["do_install"] = choice - return _after_install() - - def _after_install(): - if not _is_cloned() and not args.skip_clone: - return screen_clone - s["do_clone"] = False - return _after_clone() - - def screen_clone(): - choice = tui.confirm( - stdscr, f"faster-qwen3-tts repo not cloned. Clone it into " - f"./app/{FASTER_DIR_NAME}?", default=True, - cancel_value=_GO_BACK) - if choice is _GO_BACK: - return tui.Wizard.BACK - s["do_clone"] = choice - return _after_clone() + # Install and clone happen without asking: when the package or repo is + # missing (and not skipped by flag), the wizard just does it and moves + # to the next screen. + s["do_install"] = (not _is_installed()) and not args.skip_install + s["do_clone"] = (not _is_cloned()) and not args.skip_clone def _after_clone(): if args.input_dir is None: @@ -361,11 +342,7 @@ def _wizard(stdscr, args: argparse.Namespace) -> Optional[dict]: "plan": s["plan"], } - if not _is_installed() and not args.skip_install: - first = screen_install - else: - first = _after_install() - return tui.Wizard().run(first) + return tui.Wizard().run(_after_clone()) def _try_language(value: str) -> bool: |
