From 6064e8af876acff05081a3ca6622d14fa90211c4 Mon Sep 17 00:00:00 2001 From: jmt-gh Date: Sun, 12 Jun 2022 01:46:50 -0700 Subject: [PATCH] fix using OMMs with regular scan option --- server/objects/mediaTypes/Book.js | 3 +-- server/scanner/Scanner.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/server/objects/mediaTypes/Book.js b/server/objects/mediaTypes/Book.js index ed791e31..3b6676a8 100644 --- a/server/objects/mediaTypes/Book.js +++ b/server/objects/mediaTypes/Book.js @@ -358,12 +358,11 @@ class Book { return audioFile }) - Logger.debug(`[Book] WE ARE INSIDE UPDATE AUDIO TRACKS ========================`) this.rebuildTracks() } rebuildTracks(preferOverdriveMediaMarker) { - Logger.debug(`[Book] we are rebuilding the tracks!`) + Logger.debug(`[Book] Tracks being rebuilt...!`) Logger.debug(`[Book] preferOverdriveMediaMarker: ${JSON.stringify(preferOverdriveMediaMarker)}`) this.audioFiles.sort((a, b) => a.index - b.index) this.missingParts = [] diff --git a/server/scanner/Scanner.js b/server/scanner/Scanner.js index 832f2889..f72dd7f8 100644 --- a/server/scanner/Scanner.js +++ b/server/scanner/Scanner.js @@ -316,7 +316,7 @@ class Scanner { async scanNewLibraryItemDataChunk(newLibraryItemsData, libraryScan) { var newLibraryItems = await Promise.all(newLibraryItemsData.map((lid) => { - return this.scanNewLibraryItem(lid, libraryScan.libraryMediaType, libraryScan.preferAudioMetadata, libraryScan.preferOpfMetadata, libraryScan.findCovers, libraryScan.preferOverdriveMediaMarker, libraryScan) + return this.scanNewLibraryItem(lid, libraryScan.libraryMediaType, libraryScan.preferAudioMetadata, libraryScan.preferOpfMetadata, libraryScan.findCovers, libraryScan.scanOptions.preferOverdriveMediaMarker, libraryScan) })) newLibraryItems = newLibraryItems.filter(li => li) // Filter out nulls