From 0717ae39dbe5af25a28848f27647bfb9069f98d7 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sat, 24 Dec 2022 11:12:39 -0600 Subject: [PATCH] Fix music fine file with inode --- server/managers/CoverManager.js | 2 +- server/objects/mediaTypes/Music.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) {