manga.lastChapter is returning different value from manga.getFeed()
See original GitHub issueHi all, I noticed the value for manga.lastChapter
is different from manga.getFeed()
const manga = await MFA.Manga.get('32d76d19-8a05-4db0-9fc2-e0b0648fe9d0');
manga.lastChapter // 108
const feeds = await manga.getFeed({
limit: Infinity,
translatedLanguage: ["en"],
"order[chapter]": "desc",
});
feeds[0].chapter // 144
Not sure this is a bug, or I understand the feed chapter id wrongly
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
mangadex-full-api - npm
Represents a relationship from one Mangadex object to another such as a manga, author, etc via its id. APIRequestError. This error respresents ...
Read more >A Beginner's Guide to Manga | The New York Public Library
Here, we break down the basics you need to know before delving into the wide, fantastic world of Japanese graphic novels, a.k.a manga....
Read more >Hunter x Hunter manga returning this month - Polygon
After four years, the Hunter x Hunter manga is returning on Oct. 23, simulpubbing in both English and Japanese via Shonen Jump.
Read more >10 Manga That Went On Hiatus And Never Came Back - CBR
Fans are frustrated when their favorite manga goes on hiatus. It's even worse when there's no sign of the series' return.
Read more >mangadex-full-api: Versions - Openbase
For example includes[]=author for a manga request will return the manga object along with the author object ... getFeed() , Chapter.get() , and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
lastChapter
andlastVolume
are both returned as attributes of manga objects returned by Mangadex, so they are included as a part of the Manga class. Their values seem to be dependent on the default feed order because the first chapter based on default order seems to be the same as the Manga attribute.However, this seems incorrect as @johnlim5847 described (this chapter is ahead by 40+ chapters). Therefore, this may be a bug on Mangadex’s end or I am misunderstanding it, so for now only use
lastChapter
/lastVolume
as representations of the chapter number and volume number of the first chapter in the default feed. For any other context, using a feed request with a limit of one to get the most recent/highest-number chapter in a certain language seems like the best option.On another note, during previous versions of the official MD API,
lastChapter
contained non-number titles, but while researching this issue, it seems that all occurrences of this attribute have become numbers likelastVolume
, so the type ofManga.lastChapter
may become a number likeChapter.chapter
in the next version..lastChapter
returns a string because it’s not a function, it only gives you thelastChapter
field returned by the response.getFeed()
is a function that returns chapter data from the/manga/id/feed
.https://api.mangadex.org/docs.html#operation/get-manga-id
https://github.com/md-y/mangadex-full-api/blob/934d7e0ef342d8a87171a4aaf69067076af45046/src/structure/manga.js#L85
https://github.com/md-y/mangadex-full-api/blob/934d7e0ef342d8a87171a4aaf69067076af45046/src/structure/manga.js#L393