diff --git a/CHANGELOG.md b/CHANGELOG.md index c305f70..8714754 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,13 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi --- +## [1.48.2] — 2026-09-22 + +### Changed +- **Magazine: "Generate all audio" progress now shows page number, not article count.** "Article 6/44" said little about how far through the magazine a run actually was; it now maps back to that article's own starting page and shows "p. 20 / 204" instead, falling back to the article count if a page number isn't available for some reason. + +--- + ## [1.48.1] — 2026-09-22 ### Fixed @@ -4372,7 +4379,8 @@ Initial feature-complete release. --- -[Unreleased]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.48.1...HEAD +[Unreleased]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.48.2...HEAD +[1.48.2]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.48.1...v1.48.2 [1.48.1]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.48.0...v1.48.1 [1.48.0]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.47.1...v1.48.0 [1.47.1]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.47.0...v1.47.1 diff --git a/VERSION b/VERSION index 5525f03..4b12da2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.48.1 +1.48.2 diff --git a/static/index.html b/static/index.html index 58c2f4c..5e4d5be 100644 --- a/static/index.html +++ b/static/index.html @@ -10,7 +10,7 @@ - + @@ -27,12 +27,12 @@ - - - - - - + + + + + + @@ -403,7 +403,7 @@ window.toggleNavTree = function(treeId, chevronId) { - + diff --git a/static/js/magazine.js b/static/js/magazine.js index e1bd543..254e22e 100644 --- a/static/js/magazine.js +++ b/static/js/magazine.js @@ -825,8 +825,10 @@ async function magGenerateAllAudio() { // a while, and killing the job partway through, deliberately or via a // container restart, is a real scenario, not an edge case) should not // mean re-synthesising articles that are already done. - const missing = state.articles.filter((a) => a.status === 'approved' && !a.has_audio).map((a) => a.id); - if (!missing.length) return say('Every approved article already has audio', ''); + const missingArticles = state.articles.filter((a) => a.status === 'approved' && !a.has_audio); + if (!missingArticles.length) return say('Every approved article already has audio', ''); + const missing = missingArticles.map((a) => a.id); + const pageCount = state.doc.pageCount || 0; const btn = $('mag-audio-export-btn'); const status = $('mag-audio-export-status'); const progressWrap = $('mag-audio-export-progress-wrap'); @@ -853,12 +855,20 @@ async function magGenerateAllAudio() { if (status) status.textContent = job.detail || 'Working…'; // The job's own detail text always leads with "N/Total" -- either // "Article N/Total…" between articles, or "(N/Total) Title: sentence - // X/Y" while one is actively rendering -- so one simple match covers - // both without the backend needing a separate numeric progress field. + // X/Y" while one is actively rendering. "Article 6 of 44" means little + // on its own; "page 20 of 204" is what actually says how far through + // the magazine this run has gotten, so N is mapped back to that + // article's own starting page wherever possible. const m = /(\d+)\/(\d+)/.exec(job.detail || ''); if (m && progressBar && progressCount) { - progressBar.max = m[2]; progressBar.value = m[1]; - progressCount.textContent = m[1] + ' / ' + m[2]; + const page = missingArticles[parseInt(m[1], 10) - 1]?.pages?.[0]; + if (page && pageCount) { + progressBar.max = pageCount; progressBar.value = page; + progressCount.textContent = 'p. ' + page + ' / ' + pageCount; + } else { + progressBar.max = m[2]; progressBar.value = m[1]; + progressCount.textContent = m[1] + ' / ' + m[2]; + } } if (job.done) { say(job.error ? 'Audio export failed: ' + job.error : (job.detail || 'Audio export done'), job.error ? 'err' : 'ok');