Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comic Book Archive (*.CBX) page sequence issue #659

Closed
Titokhan opened this Issue Nov 13, 2016 · 8 comments

Comments

Projects
None yet
4 participants
@Titokhan
Copy link

Titokhan commented Nov 13, 2016

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.

@Titokhan Titokhan changed the title Comic Book Archive (*.CBX) page display issue Comic Book Archive (*.CBX) page sequence issue Nov 13, 2016

@SumatraPeter

This comment has been minimized.

Copy link

SumatraPeter commented Nov 25, 2016

+1 for natural sort order support.

@SumatraPeter

This comment has been minimized.

Copy link

SumatraPeter commented Apr 20, 2017

This issue was recently brought up again on the forum, where @kjk replied:

Can you post a sample of the actual file names inside the .cbz file?

The problem here is that there are various ways to sort the names and a heuristic that works for one case might not work for another.

@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.

@SumatraPeter

This comment has been minimized.

Copy link

SumatraPeter commented Apr 24, 2017

Link to another discussion on the new forum.

@glachancecmaisonneuve

This comment has been minimized.

Copy link
Contributor

glachancecmaisonneuve commented Sep 13, 2018

This should be closed now. see #1060

@kjk kjk closed this Sep 13, 2018

@SumatraPeter

This comment has been minimized.

Copy link

SumatraPeter commented Sep 13, 2018

Awesome, looking forward to the next stable release with this fix. :)

@SumatraPeter

This comment has been minimized.

Copy link

SumatraPeter commented Nov 1, 2018

Looks like #1060 didn't fix this after all. :(

Forum discussion here @kjk @glachancecmaisonneuve

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).

@kjk kjk reopened this Nov 2, 2018

GitHubRulesOK referenced this issue Nov 6, 2018

@kjk

This comment has been minimized.

Copy link
Member

kjk commented Nov 7, 2018

Should be fixed by 8792593 available in latest pre-release https://www.sumatrapdfreader.org/prerelease.html

@kjk kjk closed this Nov 7, 2018

@SumatraPeter

This comment has been minimized.

Copy link

SumatraPeter commented Nov 7, 2018

Thanks @kjk, this indeed looks like it's been fixed. Here are 5 archives (1 each for 7z/CB7, RAR4/CBR, RAR5/CBR, TAR/CBT and ZIP/CBZ) for testing, and my test results can be found in the forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.