mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-22 00:07:52 +01:00
Fix:Sort series before limiting #295
This commit is contained in:
parent
0a4ecc2125
commit
ab62ec689d
@ -167,6 +167,7 @@ class LibraryController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var series = libraryHelpers.getSeriesFromBooks(audiobooks, payload.minified)
|
var series = libraryHelpers.getSeriesFromBooks(audiobooks, payload.minified)
|
||||||
|
series = sort(series).asc(s => s.name)
|
||||||
payload.total = series.length
|
payload.total = series.length
|
||||||
|
|
||||||
if (payload.limit) {
|
if (payload.limit) {
|
||||||
@ -174,7 +175,7 @@ class LibraryController {
|
|||||||
series = series.slice(startIndex, startIndex + payload.limit)
|
series = series.slice(startIndex, startIndex + payload.limit)
|
||||||
}
|
}
|
||||||
|
|
||||||
payload.results = sort(series).asc(s => s.name)
|
payload.results = series
|
||||||
res.json(payload)
|
res.json(payload)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user