From 38c8fdcba7ce54ad0ad76be9ef0748df1c55ebc1 Mon Sep 17 00:00:00 2001 From: historia Date: Thu, 20 Aug 2026 23:50:37 -0400 Subject: feat: make_audiocpp_server_json.py takes an argument. remove chunk wording with audiocpp backend. --- converter/audio.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'converter/audio.py') diff --git a/converter/audio.py b/converter/audio.py index 01f78ab..d1dc28b 100644 --- a/converter/audio.py +++ b/converter/audio.py @@ -425,11 +425,19 @@ def combine_chunks(total_chunks: int, output_path: Path, if intermediate: logger.info("Chapter audio saved (intermediate): %s (%d/%d chunks)", output_path, len(chunk_files), total_chunks) - print(f"[INFO] Saved chapter audio (intermediate): {output_path.name} " - f"({len(chunk_files)}/{total_chunks} chunks)") + if len(chunk_files) == 1 and total_chunks == 1: + print(f"[INFO] Saved chapter audio (intermediate): " + f"{output_path.name}") + else: + print(f"[INFO] Saved chapter audio (intermediate): {output_path.name} " + f"({len(chunk_files)}/{total_chunks} chunks)") else: logger.info("Audiobook saved: %s (%d/%d chunks)", output_path, len(chunk_files), total_chunks) - print(f"[INFO] Saved audiobook: {output_path.name} ({len(chunk_files)}/{total_chunks} chunks)") + if len(chunk_files) == 1 and total_chunks == 1: + print(f"[INFO] Saved audiobook: {output_path.name}") + else: + print(f"[INFO] Saved audiobook: {output_path.name} " + f"({len(chunk_files)}/{total_chunks} chunks)") if speed_path is not None: logger.info("Saved speed-adjusted audiobook (%gx): %s", speed, speed_path) -- cgit v1.2.3