When searching ebooks by keyword, also search collection names

This commit is contained in:
Alex Cabal 2020-12-07 20:57:07 -06:00
parent f42fc7468e
commit 95ee5265bc

View file

@ -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;
}