Skip to content

Commit

Permalink
fix(opds): books are ordered by metadata.numberSort
Browse files Browse the repository at this point in the history
  • Loading branch information
gotson committed Mar 20, 2020
1 parent f4466b4 commit 60edbe1
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,10 @@ class OpdsController(
OpdsLinkFeedNavigation(OpdsLinkRel.SELF, "${ROUTE_BASE}series/$id"),
linkStart
),
entries = series.books.filter { it.media.status == Media.Status.READY }.map { it.toOpdsEntry() }
entries = series.books
.filter { it.media.status == Media.Status.READY }
.sortedBy { it.metadata.numberSort }
.map { it.toOpdsEntry() }
)
} ?: throw ResponseStatusException(HttpStatus.NOT_FOUND)

Expand Down

0 comments on commit 60edbe1

Please sign in to comment.