aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-09-14 03:07:26 -0700
committerFuwn <[email protected]>2023-09-14 03:07:26 -0700
commit8a17f85a02b92fdc36f3075e797e1a04a0e79270 (patch)
tree104d48f94bfef1b694743c8a1a4e08f3d6e05a9d /src/lib
parentfix(updates): ignore eslint (diff)
downloaddue.moe-8a17f85a02b92fdc36f3075e797e1a04a0e79270.tar.xz
due.moe-8a17f85a02b92fdc36f3075e797e1a04a0e79270.zip
feat(manga): resolve chapters from scans
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/mangadex.ts8
1 files changed, 8 insertions, 0 deletions
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;
}