mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Update:Series books page fallback to sort by title/collapsed series name when no sequence #1503
This commit is contained in:
parent
3df7caa838
commit
785942b94f
@ -234,6 +234,16 @@ class LibraryController {
|
|||||||
if (payload.sortBy === 'book.volumeNumber') payload.sortBy = null // TODO: Remove temp fix after mobile release 0.9.60
|
if (payload.sortBy === 'book.volumeNumber') payload.sortBy = null // TODO: Remove temp fix after mobile release 0.9.60
|
||||||
if (filterSeries && !payload.sortBy) {
|
if (filterSeries && !payload.sortBy) {
|
||||||
sortArray.push({ asc: (li) => li.media.metadata.getSeries(filterSeries).sequence })
|
sortArray.push({ asc: (li) => li.media.metadata.getSeries(filterSeries).sequence })
|
||||||
|
// If no series sequence then fallback to sorting by title (or collapsed series name for sub-series)
|
||||||
|
sortArray.push({
|
||||||
|
asc: (li) => {
|
||||||
|
if (this.db.serverSettings.sortingIgnorePrefix) {
|
||||||
|
return li.collapsedSeries?.nameIgnorePrefix || li.media.metadata.titleIgnorePrefix
|
||||||
|
} else {
|
||||||
|
return li.collapsedSeries?.name || li.media.metadata.title
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (payload.sortBy) {
|
if (payload.sortBy) {
|
||||||
|
Loading…
Reference in New Issue
Block a user