diff options
Diffstat (limited to 'app/ui/runview.py')
| -rw-r--r-- | app/ui/runview.py | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/app/ui/runview.py b/app/ui/runview.py index 0c4b0a8..4fcaeb1 100644 --- a/app/ui/runview.py +++ b/app/ui/runview.py @@ -108,6 +108,10 @@ class RunConfig: names the converter's log file for the error screen's "details" hint. NOTICE is an optional warning line shown under the progress panel (e.g. a foreign server holding the managed port). + MODEL_LABEL/VOICE_LABEL are display-only picks for the run view's + header rows — the chosen model and voice, drawn between the Server + and Status rows and hidden when the run has none (not converter + kwargs). STOP_AND_EXIT ("Stop server and exit after generating") skips the finished screen entirely: the server is stopped automatically, the TUI quits, and the results are printed to the real terminal after @@ -125,6 +129,8 @@ class RunConfig: restart_first: bool = False log_path: str = "" notice: str = "" + model_label: str = "" + voice_label: str = "" stop_and_exit: bool = False @@ -616,14 +622,14 @@ class RunView(ScreenView): scr = self.scr scr.erase() height, width = scr.getmaxyx() - if height < 14 or width < 46: + if height < 16 or width < 46: _text(scr, theme, height // 2, 2, "Terminal too small", curses.A_BOLD) scr.refresh() return _box(scr, curses, theme, height, width) - _text(scr, theme, 0, 2, " Converting audiobooks ", theme["title"]) + _text(scr, theme, 0, 2, " Generating audiobooks ", theme["title"]) inner_x = 3 label_w = 9 # "Server", "Status", "Chunk", "Elapsed" @@ -638,6 +644,21 @@ class RunView(ScreenView): _fit(f"{self.config.backend_label} @ {url}", value_w), theme["body"]) y += 1 + # The model/voice picks the form recorded (display-only; hidden + # when the backend run has none — faster has no model pick, and + # voice-design runs pick no voice). + if self.config.model_label: + _text(scr, theme, y, inner_x, "Model".ljust(label_w), + theme["dim"]) + _text(scr, theme, y, value_x, + _fit(self.config.model_label, value_w), theme["body"]) + y += 1 + if self.config.voice_label: + _text(scr, theme, y, inner_x, "Voice".ljust(label_w), + theme["dim"]) + _text(scr, theme, y, value_x, + _fit(self.config.voice_label, value_w), theme["body"]) + y += 1 state_text, state_kind = _SERVER_STATES.get( self.server, (self.server, "info")) if self.server == "starting" and self.boot_started is not None: |
