@storyteller-platform/align 0.1.39-rc.1 → 0.1.39-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -97,9 +97,7 @@ async function processAudiobook(input, output, options) {
97
97
  const filepath = (0, import_node_path.join)(input, filename);
98
98
  function onFileProgress(progress) {
99
99
  perFileProgress.set(index, progress);
100
- const updatedProgress = Array.from(perFileProgress.values()).reduce(
101
- (acc, p) => acc + p
102
- );
100
+ const updatedProgress = Array.from(perFileProgress.values()).reduce((acc, p) => acc + p) / filenames.length;
103
101
  options.logger?.info(
104
102
  `Progress: ${Math.floor(updatedProgress * 100)}%`
105
103
  );
@@ -44,9 +44,7 @@ async function processAudiobook(input, output, options) {
44
44
  const filepath = join(input, filename);
45
45
  function onFileProgress(progress) {
46
46
  perFileProgress.set(index, progress);
47
- const updatedProgress = Array.from(perFileProgress.values()).reduce(
48
- (acc, p) => acc + p
49
- );
47
+ const updatedProgress = Array.from(perFileProgress.values()).reduce((acc, p) => acc + p) / filenames.length;
50
48
  options.logger?.info(
51
49
  `Progress: ${Math.floor(updatedProgress * 100)}%`
52
50
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storyteller-platform/align",
3
- "version": "0.1.39-rc.1",
3
+ "version": "0.1.39-rc.3",
4
4
  "description": "A library and CLI for automatically aligning audiobooks and EPUBs to produce Media Overlays",
5
5
  "author": "Shane Friedman",
6
6
  "license": "MIT",