Skip to content

Fix comic page sorting by including natural path and filename order, Fixing #6642 #6904

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

terokorp
Copy link

Previously, folder names (i.e. file paths) were ignored during sorting, which caused pages from different chapters or volumes to be mixed together. Additionally, lexicographic filename sorting caused issues such as "Vol. 12 Ch. 56" appearing before "Vol. 1 Ch. 1".

Changes:

  • Sorting now considers both file.path and file.name, using a natural sort algorithm.
  • Paths and names are normalized (trimmed and cleaned) to handle inconsistencies like extra spaces or missing values.
  • This ensures that pages within the same chapter or volume appear grouped and in the correct numerical order, including support for subchapters like Ch. 4.5.

Issues
Fixes #6642

@terokorp terokorp requested a review from a team as a code owner May 28, 2025 10:03
@jellyfin-bot
Copy link
Collaborator

jellyfin-bot commented May 28, 2025

Cloudflare Pages deployment

Latest commit ac55f29
Status ✅ Deployed!
Preview URL https://094955d4.jellyfin-web.pages.dev
Type 🔀 Preview

View build logs

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESLint doesn't pass. Please fix all ESLint issues.

@terokorp terokorp force-pushed the cbz-page-sorting-fix branch from d79ce5a to ac55f29 Compare May 30, 2025 07:40
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Page Order issues with CBZ files containing folders.
2 participants