mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-03 20:49:04 +01:00
Fix Series Sort
This commit is contained in:
parent
670a461752
commit
60aeb23797
@ -179,7 +179,7 @@ class LibraryController {
|
|||||||
series = series.slice(startIndex, startIndex + payload.limit)
|
series = series.slice(startIndex, startIndex + payload.limit)
|
||||||
}
|
}
|
||||||
|
|
||||||
payload.results = series
|
payload.results = sort(series).asc(s => s.name)
|
||||||
res.json(payload)
|
res.json(payload)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,7 +194,7 @@ class LibraryController {
|
|||||||
return res.status(404).send('Series not found')
|
return res.status(404).send('Series not found')
|
||||||
}
|
}
|
||||||
audiobooks = sort(audiobooks).asc(ab => {
|
audiobooks = sort(audiobooks).asc(ab => {
|
||||||
return ab.book.volumeNumber
|
return Number(ab.book.volumeNumber)
|
||||||
})
|
})
|
||||||
res.json({
|
res.json({
|
||||||
results: audiobooks.map(ab => ab.toJSONExpanded()),
|
results: audiobooks.map(ab => ab.toJSONExpanded()),
|
||||||
|
Loading…
Reference in New Issue
Block a user