mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-08 23:04:51 +02:00
Update new library scanner to handle metadata file changes
This commit is contained in:
@ -153,7 +153,6 @@ class LibraryScanner {
|
||||
if (libraryItemData.hasLibraryFileChanges || libraryItemData.hasPathChange) {
|
||||
const libraryItem = await this.rescanLibraryItem(existingLibraryItem, libraryItemData, libraryScan)
|
||||
const oldLibraryItem = Database.libraryItemModel.getOldLibraryItem(libraryItem)
|
||||
await oldLibraryItem.saveMetadata() // Save metadata.json
|
||||
oldLibraryItemsUpdated.push(oldLibraryItem)
|
||||
} else {
|
||||
// TODO: Temporary while using old model to socket emit
|
||||
@ -264,7 +263,6 @@ class LibraryScanner {
|
||||
const newLibraryItem = await this.scanNewLibraryItem(libraryItemData, libraryScan)
|
||||
if (newLibraryItem) {
|
||||
const oldLibraryItem = Database.libraryItemModel.getOldLibraryItem(newLibraryItem)
|
||||
await oldLibraryItem.saveMetadata() // Save metadata.json
|
||||
newOldLibraryItems.push(oldLibraryItem)
|
||||
|
||||
libraryScan.resultsAdded++
|
||||
|
Reference in New Issue
Block a user