diff --git a/server/managers/CoverManager.js b/server/managers/CoverManager.js index 5c494173..49b2d79b 100644 --- a/server/managers/CoverManager.js +++ b/server/managers/CoverManager.js @@ -230,7 +230,7 @@ class CoverManager { } async saveEmbeddedCoverArt(libraryItem) { - const audioFileWithCover = null + let audioFileWithCover = null if (libraryItem.mediaType === 'book') { audioFileWithCover = libraryItem.media.audioFiles.find(af => af.embeddedCoverArt) } else if (libraryItem.mediaType == 'podcast') { diff --git a/server/objects/mediaTypes/Music.js b/server/objects/mediaTypes/Music.js index 1f6520a5..f7517dbe 100644 --- a/server/objects/mediaTypes/Music.js +++ b/server/objects/mediaTypes/Music.js @@ -115,7 +115,7 @@ class Music { } findFileWithInode(inode) { - return this.audioFile && this.audioFile.ino === inode + return (this.audioFile && this.audioFile.ino === inode) ? this.audioFile : null } setData(mediaData) {