CBZ: sort pages numerically

Fixes https://github.com/johnfactotum/foliate/issues/1549
This commit is contained in:
John Factotum
2026-03-05 14:02:01 +08:00
parent b74d50e6d4
commit 3393b85c80
+1 -1
View File
@@ -20,7 +20,7 @@ export const makeComicBook = ({ entries, loadBlob, getSize }, file) => {
const files = entries
.map(entry => entry.filename)
.filter(name => exts.some(ext => name.endsWith(ext)))
.sort()
.sort(new Intl.Collator([], { numeric: true }).compare)
if (!files.length) throw new Error('No supported image files in archive')
const book = {}