max volume calculation fix
This commit is contained in:
+3
-2
@@ -354,8 +354,9 @@ async function main() {
|
|||||||
let startVol = novel['lastVolume'];
|
let startVol = novel['lastVolume'];
|
||||||
let totalChapters = chapters.length;
|
let totalChapters = chapters.length;
|
||||||
|
|
||||||
const maxVolume = novel['completed'] ? startVol + 1 + Math.floor(totalChapters / novel['completedVolumeChapterCount']) : startVol + Math.floor(totalChapters / novel['completedVolumeChapterCount']);
|
const maxVolume = novel['completed'] ? startVol + Math.ceil(totalChapters / novel['completedVolumeChapterCount']) : startVol + Math.floor(totalChapters / novel['completedVolumeChapterCount']);
|
||||||
const maxVolLen = (novel['completed'] ? maxVolume : maxVolume + Math.floor((chapters.length - (maxVolume + novel['completedVolumeChapterCount'])) / novel['volumeChapterCount'])).toString().length;
|
const maxVolLen = (novel['completed'] ? maxVolume :
|
||||||
|
maxVolume + Math.floor((chapters.length - (maxVolume * novel['completedVolumeChapterCount'])) / novel['volumeChapterCount'])).toString().length;
|
||||||
|
|
||||||
let ebookAttachments = [];
|
let ebookAttachments = [];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user