feat(config): add rename_chapters field, CLI flag, and 3-layer resolution

Add rename_chapters boolean config field following the established
pattern from download_extras/download_covers. Config defaults to
True; YAML supports explicit false; --rename-chapters CLI flag forces
True overriding config. Threaded through sync_run() with resolved value
ready for pipeline wiring in slice 3.

Closes #33
This commit is contained in:
AlexKucera committed 2026-06-05 17:15:16 +02:00
1 parent b6df4e3a9b
commit af5ad4953c
11 files changed
+175 -2

No files matched your search

+2
View File
@@ -16,6 +16,7 @@ class Config:
output_dir: str
download_extras: bool
download_covers: bool
rename_chapters: bool
_config_path: Path | None = None # None = defaulted (file missing)
workers: int = 3
@@ -139,6 +140,7 @@ def load_config(
output_dir=librofm.get("output_dir", "./audiobooks"),
download_extras=librofm.get("download_extras", True),
download_covers=librofm.get("download_covers", True),
rename_chapters=librofm.get("rename_chapters", True),
_config_path=config_path,
workers=librofm.get("workers", 3),
)