NeverDecaf/MangaTosho

MangaDex chapter numbering

NeverDecaf opened this issue · 0 comments

This is a long-winded explanation of the issue with MangaDex chapter/volume numbering.

MangaDex chapters have both a volume and chapter number associated with them, but it is possible for the volume to be omitted, leaving just a chapter number. To handle this, MT makes some assumptions about "un-volumed" chapters to try and correctly assign chapter numbers, this is best explained with an example:

Assume an example series with chapters 1-10 all with volume=1.
This series also has a chapter 11 and 12 with no associated volume.
MT adds ch. 11&12 to a virtual volume 2 and assumes these occur after all existing volumes.
This causes no issue and all chapter numbers are correct when downloaded.
Now assume an extra chapter is added (a special) with chapter:1 and no volume.
The series now has v1, ch1-10 and v2[virtual], ch 1, 11, and 12.
Due to the numbering conflict, v2 is assumed to have restarted its chapter numbering from 1 (reasonable assumption as v2 could be v2c1, v2c2 etc.)
To correctly order these chapters, v2 ch numbers are increased to occur after v1, this leaves you with the following chapter numbers:
1-10, 11, 21, and 22.
This creates both a gap and inaccuracy in chapter numbers, but does not cause missing/skipped chapters on its own.
The real problem begins when chapters 11 and 12 are later correctly assigned to a volume, but the special c1 still remains volumeless.
MT will now download chapter 12 a second time (you will have both 12 and 22 with the same content) and will also assume the special is chapter 13.
This now becomes a critical issue.
If further releases are all correctly assigned a volume: the special will be assumed as c13 and re-downloaded, and the real chapter 13 will be skipped. When the real 13 is released the special will now become 14 and the process will repeat. This cycle could continue leaving you with many copies of the special in place of real chapters.
If further releases instead are all volume-less, or if the special is removed/assigned to volume 1 you will still have an issue once the "real" chapter 21 and 22 are available. Since these 2 directories already exist (but contain 11 and 12) they will not be re-downloaded and thus you will have missing chapters.

There is not really a good catch-all solution, but there are some options:

  1. Ignore MangaDex chapter numbers entirely and just assign sequential chapter numbers based on upload date. This may be the safest solution but would lead to wildly inaccurate chapter numbers, especially if groups have uploaded many v2s or there are multiple groups available.
  2. Ignore volume numbers and trust uploaders to correctly assign overall chapter numbers rather than volume-specific chapter numbers. This seems like the best solution as the vast majority of series seem to correctly preserve chapter numbering across volumes and this would result in the most accurate chapter numbers.