From 290340a3850437abe6be591caa588efcc4877d62 Mon Sep 17 00:00:00 2001 From: advplyr Date: Mon, 9 May 2022 07:23:29 -0500 Subject: [PATCH] Fix:Rescan filter out items not updated #577 --- server/scanner/Scanner.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/server/scanner/Scanner.js b/server/scanner/Scanner.js index e29781b1..8b55ee5b 100644 --- a/server/scanner/Scanner.js +++ b/server/scanner/Scanner.js @@ -291,12 +291,13 @@ class Scanner { return this.rescanLibraryItem(lid, libraryScan) })) + itemsUpdated = itemsUpdated.filter(li => li) // Filter out nulls + for (const libraryItem of itemsUpdated) { // Temp authors & series are inserted - create them if found await this.createNewAuthorsAndSeries(libraryItem) } - itemsUpdated = itemsUpdated.filter(li => li) // Filter out nulls if (itemsUpdated.length) { libraryScan.resultsUpdated += itemsUpdated.length await this.db.updateLibraryItems(itemsUpdated) @@ -728,16 +729,14 @@ class Scanner { var libraryItem = itemsInLibrary[i] if (libraryItem.media.metadata.asin && library.settings.skipMatchingMediaWithAsin) { - Logger.debug(`[Scanner] matchLibraryItems: Skipping "${ - libraryItem.media.metadata.title - }" because it already has an ASIN (${i + 1} of ${itemsInLibrary.length})`) + Logger.debug(`[Scanner] matchLibraryItems: Skipping "${libraryItem.media.metadata.title + }" because it already has an ASIN (${i + 1} of ${itemsInLibrary.length})`) continue; } if (libraryItem.media.metadata.isbn && library.settings.skipMatchingMediaWithIsbn) { - Logger.debug(`[Scanner] matchLibraryItems: Skipping "${ - libraryItem.media.metadata.title - }" because it already has an ISBN (${i + 1} of ${itemsInLibrary.length})`) + Logger.debug(`[Scanner] matchLibraryItems: Skipping "${libraryItem.media.metadata.title + }" because it already has an ISBN (${i + 1} of ${itemsInLibrary.length})`) continue; }