mangal icon indicating copy to clipboard operation
mangal copied to clipboard

Mangadex doesn't list all chapters given the language

Open luevano opened this issue 1 year ago • 7 comments

Describe the bug

I'm running into the issue where I'm trying to download JoJo's part 5 colored, and it only lists 70 chapters out of 155. At first I thought it was the issue described at #155 which was said that it was because of external links. It is not the case for this manga.

I tracked it down to the language option, as using "any" shows the correct chapters (and all other languages, too), but "en" stops at 70.

The manga in question is this one (there are 2 with the same name). I've manually checked the API and the chapters are fine.

By using the API directly with the language "en" (https://api.mangadex.org/manga/fd917921-5e97-479f-b22c-5d7f00e1c830/aggregate?translatedLanguage[]=en) gives all the 155 chapters.

I even checked chapter 71, 72 and 73 to see if they had the correct language and if they were not external. I used the API for this too (https://api.mangadex.org/chapter/ecbda659-532a-401f-8585-d6025bf745fe, change the id for whatever chapter id).

Why is 500 added to the offset at line 60-63 at chapters.go?, looks like it would be added too often... and all "en" chapters are available. Also lines 86-92 are both out of the for loop, maybe this is a bug?

Reproduction steps

  1. Search for "Jojos colored" using built in Mangadex (using language "en").
  2. Select "JoJo's Bizarre Adventure Part 5: Vento Aureo" (fd917921-5e97-479f-b22c-5d7f00e1c830).
  3. It will only show 70 chapters.
  4. Using the API we can see that for "en", there are 155 chapters (https://api.mangadex.org/manga/fd917921-5e97-479f-b22c-5d7f00e1c830/aggregate?translatedLanguage[]=en).
  5. We can check that chapter 71 is "en" and externalUrl is null (https://api.mangadex.org/chapter/ecbda659-532a-401f-8585-d6025bf745fe).
  6. Do the same search with "any" as language, and the correct "en" 71 chapter will be found (id ecbda659-532a-401f-8585-d6025bf745fe). This might require to delete the mangal cache.

Expected behavior

To actually list all chapters with the specified language.

Additional context

No response

Operating System

Linux

luevano avatar May 30 '23 17:05 luevano