diff --git a/abogen/domain/audio_sink.py b/abogen/domain/audio_sink.py index 0fe9bd7..44cf939 100644 --- a/abogen/domain/audio_sink.py +++ b/abogen/domain/audio_sink.py @@ -54,7 +54,7 @@ def _ensure_ffmpeg() -> None: def _get_ffmpeg_cache_root() -> str: - from abogen.infrastructure.cache import get_internal_cache_path + from abogen.utils import get_internal_cache_path return get_internal_cache_path("ffmpeg") diff --git a/abogen/domain/output_paths.py b/abogen/domain/output_paths.py index 58c6f9a..4b79d40 100644 --- a/abogen/domain/output_paths.py +++ b/abogen/domain/output_paths.py @@ -76,7 +76,7 @@ def sanitize_filename_for_chapter(title: str, index: int, max_len: int = 80) -> return f"{index:02d}_{sanitized}" -def sanitize_output_stem(name: str) -> str: +def sanitize_output_stem(name: str, index: int = 0) -> str: base = Path(name or "").stem sanitized = _OUTPUT_SANITIZE_RE.sub("_", base).strip("_") return sanitized or "output"