mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-21 00:31:37 +00:00
Batch author numBooks updates at scan end via authors_num_books_updated
This commit is contained in:
parent
7ee5e1bdf6
commit
9d9ab49664
6 changed files with 75 additions and 17 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue