From 182545a729f223d56ea0a120b594ad3a7a8d3be4 Mon Sep 17 00:00:00 2001 From: advplyr Date: Tue, 19 Apr 2022 21:10:24 -0500 Subject: [PATCH] Fix ebook scan --- server/scanner/Scanner.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/scanner/Scanner.js b/server/scanner/Scanner.js index 73e42d94..b638d71e 100644 --- a/server/scanner/Scanner.js +++ b/server/scanner/Scanner.js @@ -386,13 +386,13 @@ class Scanner { await AudioFileScanner.scanAudioFiles(audioFiles, libraryItemData, libraryItem, preferAudioMetadata, libraryScan) } + await libraryItem.syncFiles(preferOpfMetadata) + if (!libraryItem.hasMediaEntities) { Logger.warn(`[Scanner] Library item has no media files "${libraryItemData.path}"`) return null } - await libraryItem.syncFiles(preferOpfMetadata) - // Extract embedded cover art if cover is not already in directory if (libraryItem.media.hasEmbeddedCoverArt && !libraryItem.media.coverPath) { var coverPath = await this.coverManager.saveEmbeddedCoverArt(libraryItem)