Add rename_chapters configuration following the exact same pattern as the existing download_extras and download_covers boolean toggles.
End-to-end behavior: Users can control chapter renaming via three layers (CLI > env var > config file), all defaulting to enabled (True). The Config dataclass gains a new field; YAML config, environment, and CLI argparse all respect it.
Changes:
Config dataclass: Add rename_chapters: bool = True field
Config loader: Read rename_chapters from merged YAML dict in load_config()
Env var:RENAME_CHAPTERS (read in config loading layer)
CLI flag:--rename-chapters / --no-rename-chapters in argparse (cli.py)
Thread through:sync_run() accepts new param → passes to _download_fn closure → available when wiring into download pipeline (slice 3)
Follows established pattern from download_extras (issue #7) and workers (issue #12).
Acceptance criteria
Config.rename_chapters defaults to True
rename_chapters: false in config.yaml produces Config(rename_chapters=False)
RENAME_CHAPTERS=false env var overrides config file value
--no-rename-chapters CLI flag overrides both config and env var
--rename-chapters CLI flag explicitly enables it (for completeness)
Field threaded through sync_run() → _download_fn closure → ready for pipeline use
~4 tests for config defaults, YAML reading, and CLI override
## Parent
#19
## What to build
Add `rename_chapters` configuration following the exact same pattern as the existing `download_extras` and `download_covers` boolean toggles.
**End-to-end behavior:** Users can control chapter renaming via three layers (CLI > env var > config file), all defaulting to enabled (`True`). The `Config` dataclass gains a new field; YAML config, environment, and CLI argparse all respect it.
**Changes:**
- **Config dataclass:** Add `rename_chapters: bool = True` field
- **Config loader:** Read `rename_chapters` from merged YAML dict in `load_config()`
- **Env var:** `RENAME_CHAPTERS` (read in config loading layer)
- **CLI flag:** `--rename-chapters` / `--no-rename-chapters` in `argparse` (cli.py)
- **Thread through:** `sync_run()` accepts new param → passes to `_download_fn` closure → available when wiring into download pipeline (slice 3)
Follows established pattern from `download_extras` (issue #7) and `workers` (issue #12).
## Acceptance criteria
- [ ] `Config.rename_chapters` defaults to `True`
- [ ] `rename_chapters: false` in config.yaml produces `Config(rename_chapters=False)`
- [ ] `RENAME_CHAPTERS=false` env var overrides config file value
- [ ] `--no-rename-chapters` CLI flag overrides both config and env var
- [ ] `--rename-chapters` CLI flag explicitly enables it (for completeness)
- [ ] Field threaded through `sync_run()` → `_download_fn` closure → ready for pipeline use
- [ ] ~4 tests for config defaults, YAML reading, and CLI override
## Blocked by
None - can start immediately (parallel with #32)
✅ Complete: rename_chapters config field + --rename-chapters CLI flag. 5 new tests, 223 total passing. Committed as af5ad49 on feature/rename-mp3.
✅ Complete: `rename_chapters` config field + `--rename-chapters` CLI flag. 5 new tests, 223 total passing. Committed as `af5ad49` on `feature/rename-mp3`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Parent
#19
What to build
Add
rename_chaptersconfiguration following the exact same pattern as the existingdownload_extrasanddownload_coversboolean toggles.End-to-end behavior: Users can control chapter renaming via three layers (CLI > env var > config file), all defaulting to enabled (
True). TheConfigdataclass gains a new field; YAML config, environment, and CLI argparse all respect it.Changes:
rename_chapters: bool = Truefieldrename_chaptersfrom merged YAML dict inload_config()RENAME_CHAPTERS(read in config loading layer)--rename-chapters/--no-rename-chaptersinargparse(cli.py)sync_run()accepts new param → passes to_download_fnclosure → available when wiring into download pipeline (slice 3)Follows established pattern from
download_extras(issue #7) andworkers(issue #12).Acceptance criteria
Config.rename_chaptersdefaults toTruerename_chapters: falsein config.yaml producesConfig(rename_chapters=False)RENAME_CHAPTERS=falseenv var overrides config file value--no-rename-chaptersCLI flag overrides both config and env var--rename-chaptersCLI flag explicitly enables it (for completeness)sync_run()→_download_fnclosure → ready for pipeline useBlocked by
None - can start immediately (parallel with #32)
✅ Complete:
rename_chaptersconfig field +--rename-chaptersCLI flag. 5 new tests, 223 total passing. Committed asaf5ad49onfeature/rename-mp3.