diff options
Diffstat (limited to 'app/backends/qwen.py')
| -rw-r--r-- | app/backends/qwen.py | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/app/backends/qwen.py b/app/backends/qwen.py index 3416ebe..f1e7c79 100644 --- a/app/backends/qwen.py +++ b/app/backends/qwen.py @@ -71,15 +71,6 @@ def _wizard(stdscr, args: argparse.Namespace) -> Optional[dict]: _GO_BACK = object() s: dict = {} - def screen_install(): - choice = tui.confirm(stdscr, "qwen-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 args.port_custom is None: return screen_custom_port @@ -145,11 +136,11 @@ def _wizard(stdscr, args: argparse.Namespace) -> Optional[dict]: "speaker": s["speaker"], } - if not _is_installed() and not args.skip_install: - first = screen_install - else: - first = _after_install() - return tui.Wizard().run(first) + # pip install happens without asking: when the package 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 + return tui.Wizard().run(_after_install()) def _execute(settings: dict) -> int: |
