mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-03 19:04:39 -05:00
Apply natural sort to local manga pages in Directory format (#826)
This commit is contained in:
@@ -328,8 +328,8 @@ class LocalSource(
|
|||||||
return when (val format = getFormat(chapter)) {
|
return when (val format = getFormat(chapter)) {
|
||||||
is Format.Directory -> {
|
is Format.Directory -> {
|
||||||
format.file.listFiles().orEmpty()
|
format.file.listFiles().orEmpty()
|
||||||
.sortedBy { it.name }
|
|
||||||
.filter { !it.isDirectory && ImageUtil.isImage(it.name, it::inputStream) }
|
.filter { !it.isDirectory && ImageUtil.isImage(it.name, it::inputStream) }
|
||||||
|
.sortedWith { f1, f2 -> f1.name.compareToCaseInsensitiveNaturalOrder(f2.name) }
|
||||||
.mapIndexed { index, page ->
|
.mapIndexed { index, page ->
|
||||||
Page(
|
Page(
|
||||||
index,
|
index,
|
||||||
|
|||||||
Reference in New Issue
Block a user