From 95ee5265bcaca8dde0d471f72a953a0cf0f3a723 Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Mon, 7 Dec 2020 20:57:07 -0600 Subject: [PATCH] When searching ebooks by keyword, also search collection names --- lib/Ebook.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Ebook.php b/lib/Ebook.php index 210d9f1d..2bd683af 100644 --- a/lib/Ebook.php +++ b/lib/Ebook.php @@ -422,12 +422,16 @@ class Ebook{ } public function Contains(string $query): bool{ - // When searching an ebook, we search the title, alternate title, author(s), SE tags, and LoC tags. + // When searching an ebook, we search the title, alternate title, author(s), SE tags, series data, and LoC tags. $searchString = $this->FullTitle ?? $this->Title; $searchString .= ' ' . $this->AlternateTitle; + foreach($this->Collections as $collection){ + $searchString .= ' ' . $collection->Name; + } + foreach($this->Authors as $author){ $searchString .= ' ' . $author->Name; }