Fix:Sort series before limiting #295

This commit is contained in:
advplyr 2022-01-07 17:26:12 -06:00
parent 0a4ecc2125
commit ab62ec689d

View File

@ -167,6 +167,7 @@ class LibraryController {
}
var series = libraryHelpers.getSeriesFromBooks(audiobooks, payload.minified)
series = sort(series).asc(s => s.name)
payload.total = series.length
if (payload.limit) {
@ -174,7 +175,7 @@ class LibraryController {
series = series.slice(startIndex, startIndex + payload.limit)
}
payload.results = sort(series).asc(s => s.name)
payload.results = series
res.json(payload)
}