From afce849ed9d14d7223eab3912282624a7c0656a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20J=C3=B6nsson?= Date: Wed, 14 Mar 2018 10:28:36 +0100 Subject: [PATCH] dont go all the way to 100% --- src/FimFic2Epub.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FimFic2Epub.js b/src/FimFic2Epub.js index f1d064a..d4ffc14 100644 --- a/src/FimFic2Epub.js +++ b/src/FimFic2Epub.js @@ -390,7 +390,7 @@ class FimFic2Epub extends Emitter { if (!ch.realWordCount) { ch.realWordCount = utils.htmlWordCount(chapter.content) } - this.progress(0, (i + 1) / this.chapters.length, 'Processed chapter ' + (i + 1) + ' / ' + this.chapters.length) + this.progress(0, ((i + 1) / this.chapters.length) * 0.99, 'Processed chapter ' + (i + 1) + ' / ' + this.chapters.length) }) .then(() => new Promise((resolve) => setTimeout(resolve, 0))) } @@ -404,7 +404,7 @@ class FimFic2Epub extends Emitter { this.readingEase = await utils.readingEase( content, this.options.readingEaseWakeupInterval, (progress) => { - this.progress(0, progress, 'Calculating Flesch reading ease ' + Math.round(progress * 100) + '%') + this.progress(0, progress * 0.99, 'Calculating Flesch reading ease ' + Math.round(progress * 100) + '%') } ) }