feat: Add auto-prefix option for chapter titles and enhance reader functionality

- Introduced `auto_prefix_chapter_titles` setting in Job and PendingJob classes to control prefixing of chapter titles with "Chapter".
- Updated job detail and settings templates to display and configure the new option.
- Enhanced reader.js to manage playback controls, including chapter navigation and playback speed adjustments.
- Implemented a new prepare_chapters.html template for chapter selection and configuration during job preparation.
- Added tests for chapter title formatting and heading equivalence to ensure correct behavior of the new feature.
This commit is contained in:
JB
2025-10-14 06:24:15 -07:00
parent bccfd9f5c5
commit 7ca030d67d
11 changed files with 960 additions and 44 deletions
+7
View File
@@ -110,6 +110,13 @@
<input type="number" step="0.1" min="0" id="chapter_intro_delay" name="chapter_intro_delay" value="{{ '%.2f'|format(settings.chapter_intro_delay) }}">
<p class="hint">Inserted between the spoken chapter title and the chapter content. Set to 0 to disable.</p>
</div>
<div class="field field--stack">
<label class="toggle-pill">
<input type="checkbox" name="auto_prefix_chapter_titles" value="true" {% if settings.auto_prefix_chapter_titles %}checked{% endif %}>
<span>Add "Chapter" before numeric chapter titles</span>
</label>
<p class="hint">Ensures the spoken chapter heading starts with "Chapter" when source titles begin with only a number or numeral.</p>
</div>
</fieldset>
<fieldset class="settings__section">