From 8a17f85a02b92fdc36f3075e797e1a04a0e79270 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 14 Sep 2023 03:07:26 -0700 Subject: feat(manga): resolve chapters from scans --- src/lib/mangadex.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/lib/mangadex.ts') diff --git a/src/lib/mangadex.ts b/src/lib/mangadex.ts index d2eb8c3b..b17a2ffa 100644 --- a/src/lib/mangadex.ts +++ b/src/lib/mangadex.ts @@ -57,6 +57,14 @@ export const chapterCount = async ( let lastChapter = lastChapterData['data'][0]['attributes']['chapter']; + if ((manga.mediaListEntry || { progress: 0 }).progress >= lastChapter) { + const anilistData = await recentMediaActivities(identity, manga); + + if (anilistData !== null && anilistData > lastChapter) { + lastChapter = anilistData; + } + } + if (lastChapter == 0) { lastChapter = null; } -- cgit v1.2.3