mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-26 10:49:00 +02:00
Update new library scanner to handle metadata file changes
This commit is contained in:
parent
9123dcb365
commit
e63aab95d8
6 changed files with 265 additions and 69 deletions
|
@ -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++
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue