Merge pull request #3985 from advplyr/fix-quick-match-all-crash

Fix server crash when quick match all updates series sequence #3961
This commit is contained in:
advplyr 2025-02-14 17:22:29 -06:00 committed by GitHub
commit 373551fb74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 7 deletions

View File

@ -103,7 +103,7 @@ class LibraryItem extends Model {
{
model: this.sequelize.models.series,
through: {
attributes: ['sequence', 'createdAt']
attributes: ['id', 'sequence', 'createdAt']
}
}
]

View File

@ -48,13 +48,7 @@ class Scanner {
let updatePayload = {}
let hasUpdated = false
let existingAuthors = [] // Used for checking if authors or series are now empty
let existingSeries = []
if (libraryItem.isBook) {
existingAuthors = libraryItem.media.authors.map((a) => a.id)
existingSeries = libraryItem.media.series.map((s) => s.id)
const searchISBN = options.isbn || libraryItem.media.isbn
const searchASIN = options.asin || libraryItem.media.asin