aboutsummaryrefslogtreecommitdiff
path: root/converter/audio.py
diff options
context:
space:
mode:
Diffstat (limited to 'converter/audio.py')
-rw-r--r--converter/audio.py14
1 files changed, 11 insertions, 3 deletions
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)