mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-28 09:38:56 +01:00
Add sortBy Last Book Added and Updated to series
This commit is contained in:
parent
6a0adf7433
commit
122ec140e8
@ -163,6 +163,14 @@ export default {
|
|||||||
text: this.$strings.LabelAddedAt,
|
text: this.$strings.LabelAddedAt,
|
||||||
value: 'addedAt'
|
value: 'addedAt'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
text: this.$strings.LabelLastBookAdded,
|
||||||
|
value: 'lastBookAdded'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: this.$strings.LabelLastBookUpdated,
|
||||||
|
value: 'lastBookUpdated'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: this.$strings.LabelTotalDuration,
|
text: this.$strings.LabelTotalDuration,
|
||||||
value: 'totalDuration'
|
value: 'totalDuration'
|
||||||
|
@ -250,6 +250,8 @@
|
|||||||
"LabelItem": "Item",
|
"LabelItem": "Item",
|
||||||
"LabelLanguage": "Language",
|
"LabelLanguage": "Language",
|
||||||
"LabelLanguageDefaultServer": "Default Server Language",
|
"LabelLanguageDefaultServer": "Default Server Language",
|
||||||
|
"LabelLastBookAdded": "Last Book Added",
|
||||||
|
"LabelLastBookUpdated": "Last Book Updated",
|
||||||
"LabelLastSeen": "Last Seen",
|
"LabelLastSeen": "Last Seen",
|
||||||
"LabelLastTime": "Last Time",
|
"LabelLastTime": "Last Time",
|
||||||
"LabelLastUpdate": "Last Update",
|
"LabelLastUpdate": "Last Update",
|
||||||
|
@ -417,6 +417,10 @@ class LibraryController {
|
|||||||
return se.totalDuration
|
return se.totalDuration
|
||||||
} else if (payload.sortBy === 'addedAt') {
|
} else if (payload.sortBy === 'addedAt') {
|
||||||
return se.addedAt
|
return se.addedAt
|
||||||
|
} else if (payload.sortBy === 'lastBookUpdated') {
|
||||||
|
return Math.max(...(se.books).map(x => x.updatedAt), 0)
|
||||||
|
} else if (payload.sortBy === 'lastBookAdded') {
|
||||||
|
return Math.max(...(se.books).map(x => x.addedAt), 0)
|
||||||
} else { // sort by name
|
} else { // sort by name
|
||||||
return this.db.serverSettings.sortingIgnorePrefix ? se.nameIgnorePrefixSort : se.name
|
return this.db.serverSettings.sortingIgnorePrefix ? se.nameIgnorePrefixSort : se.name
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user