Fix ebook scan

This commit is contained in:
advplyr 2022-04-19 21:10:24 -05:00
parent e83df2bf4b
commit 182545a729

View File

@ -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)