mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-04-24 14:37:14 -04:00
Fix:Book library sort by publishedYear #3620
- Updated sort to cast publishedYear to INTEGER
This commit is contained in:
parent
46a3c3de33
commit
75eef8d722
1 changed files with 1 additions and 1 deletions
|
@ -259,7 +259,7 @@ module.exports = {
|
|||
} else if (sortBy === 'media.duration') {
|
||||
return [['duration', dir]]
|
||||
} else if (sortBy === 'media.metadata.publishedYear') {
|
||||
return [['publishedYear', dir]]
|
||||
return [[Sequelize.literal(`CAST(\`book\`.\`publishedYear\` AS INTEGER)`), dir]]
|
||||
} else if (sortBy === 'media.metadata.authorNameLF') {
|
||||
return [[Sequelize.literal('author_name COLLATE NOCASE'), dir]]
|
||||
} else if (sortBy === 'media.metadata.authorName') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue