mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-08-26 05:14:00 +02:00
Batch author numBooks updates at scan end via authors_num_books_updated
This commit is contained in:
@@ -234,8 +234,7 @@ class LibraryScanner {
|
||||
SocketAuthority.libraryItemsEmitter('items_updated', libraryItemsUpdated)
|
||||
}
|
||||
|
||||
// Authors and series that were removed from books should be removed if they are now empty
|
||||
await LibraryItemScanner.checkAuthorsAndSeriesRemovedFromBooks(libraryScan.libraryId, libraryScan)
|
||||
if (this.shouldCancelScan(libraryScan)) return true
|
||||
|
||||
// Update missing library items
|
||||
if (libraryItemIdsMissing.length) {
|
||||
@@ -281,6 +280,9 @@ class LibraryScanner {
|
||||
}
|
||||
}
|
||||
|
||||
// Author book count updates and empty authors/series cleanup after all items are processed
|
||||
await LibraryItemScanner.finalizeAuthorsAndSeriesFromScan(libraryScan.libraryId, libraryScan)
|
||||
|
||||
libraryScan.addLog(LogLevel.INFO, `Scan completed. ${libraryScan.resultStats}`)
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user