From f84634e97832959cb15480f287155e30419ca827 Mon Sep 17 00:00:00 2001 From: advplyr Date: Mon, 9 Oct 2023 17:09:36 -0500 Subject: [PATCH] Fix OPF file scanner series sequence, book scanner check for mismatched audio file found lengths --- server/scanner/BookScanner.js | 4 ++-- server/scanner/OpfFileScanner.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/scanner/BookScanner.js b/server/scanner/BookScanner.js index e7d49d35..e579bcc9 100644 --- a/server/scanner/BookScanner.js +++ b/server/scanner/BookScanner.js @@ -76,8 +76,8 @@ class BookScanner { ] }) - let hasMediaChanges = libraryItemData.hasAudioFileChanges - if (libraryItemData.hasAudioFileChanges || libraryItemData.audioLibraryFiles.length !== media.audioFiles.length) { + let hasMediaChanges = libraryItemData.hasAudioFileChanges || libraryItemData.audioLibraryFiles.length !== media.audioFiles.length + if (hasMediaChanges) { // Filter out audio files that were removed media.audioFiles = media.audioFiles.filter(af => !libraryItemData.checkAudioFileRemoved(af)) diff --git a/server/scanner/OpfFileScanner.js b/server/scanner/OpfFileScanner.js index ba43ce18..abc2540a 100644 --- a/server/scanner/OpfFileScanner.js +++ b/server/scanner/OpfFileScanner.js @@ -38,7 +38,7 @@ class OpfFileScanner { sequence: opfMetadata.sequence || null }] } - } else if (opfMetadata[key]) { + } else if (opfMetadata[key] && key !== 'sequence') { bookMetadata[key] = opfMetadata[key] } }