diff --git a/server/controllers/LibraryItemController.js b/server/controllers/LibraryItemController.js index 4aff7a13..2b25474e 100644 --- a/server/controllers/LibraryItemController.js +++ b/server/controllers/LibraryItemController.js @@ -259,7 +259,6 @@ class LibraryItemController { // Check if library item media has a cover path if (!libraryItem.media.coverPath || !await fs.pathExists(libraryItem.media.coverPath)) { - Logger.debug(`[LibraryItemController] getCover: Library item "${req.params.id}" has no cover path`) return res.sendStatus(404) } diff --git a/server/controllers/SearchController.js b/server/controllers/SearchController.js index 2749016c..93587bc4 100644 --- a/server/controllers/SearchController.js +++ b/server/controllers/SearchController.js @@ -26,7 +26,7 @@ class SearchController { let results = null if (podcast) results = await PodcastFinder.findCovers(query.title) - else results = await BookFinder.findCovers(query.provider || 'google', query.title, query.author || null) + else results = await BookFinder.findCovers(query.provider || 'google', query.title, query.author || '') res.json({ results }) diff --git a/server/finders/BookFinder.js b/server/finders/BookFinder.js index 96735cc9..bcf8ea06 100644 --- a/server/finders/BookFinder.js +++ b/server/finders/BookFinder.js @@ -234,7 +234,7 @@ class BookFinder { if (!books.length && maxFuzzySearches > 0) { // normalize title and author title = title.trim().toLowerCase() - author = author.trim().toLowerCase() + author = author?.trim().toLowerCase() || '' // Now run up to maxFuzzySearches fuzzy searches let candidates = new Set()