Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Comic Book Archive (*.CBX) page sequence issue #659
As described here, if the comic container doesn't follow the use of preceding zeros for all positions (example: using 01 rather than 1) then the viewer rearranges the pages. Most of the desktop readers ignore this & correctly display the page sequence. Can it be possible to fix this in the next update?
I've prepared a dummy CBZ file as example: http://ge.tt/8c4a25h2
Please notice the page number footer to get the rearranging issue.
@kjk You can see the file linked to above for an example. Basically unless the requisite padding with leading zeroes is present Sumatra gets the sort order wrong. So we end up with something like 1.png, 10.png, 11.png, 2.png instead of the obvious correct (for humans) order.
You can see the references list of the Wikipedia article I've linked to above for more details if required. Martin Pool's algorithm might also be of interest to you: https://github.com/sourcefrog/natsort
Finally, I just want to note that even Windows Explorer has used natural sort by default since XP was released more than a decade-and-a-half ago, and every other decent modern sequential image viewer/comic book reader I know of has been using natural sort for ages.
Looks like #1060 didn't fix this after all. :(
P.S. Here are 10 archives (2 each for 7z/CB7, RAR4/CBR, RAR5/CBR, TAR/CBT and ZIP/CBZ) for testing. The "Good" ones have all the images inside in proper order (pages 1 to 10), whereas the "Bad" ones have been created specifically with the images in the wrong order (pages 6 to 10, then 1 to 5).