From 4fa5655178190e27a3ac4ad28771a4c90464794a Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 12 Feb 2020 00:13:36 +0100 Subject: [PATCH] Including aliases in the search query --- Kyoo/Controllers/LibraryManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Kyoo/Controllers/LibraryManager.cs b/Kyoo/Controllers/LibraryManager.cs index 7d90e8ed..32775497 100644 --- a/Kyoo/Controllers/LibraryManager.cs +++ b/Kyoo/Controllers/LibraryManager.cs @@ -71,7 +71,8 @@ namespace Kyoo.Controllers return (from show in _database.Shows from l in _database.CollectionLinks.DefaultIfEmpty() where l.CollectionID == null select show).AsEnumerable().Union( from collection in _database.Collections select collection.AsShow()) - .Where(x => EF.Functions.Like(x.Title, $"%{searchQuery}%")) + .Where(x => EF.Functions.Like(x.Title, $"%{searchQuery}%") + || EF.Functions.Like(x.GetAliases(), $"%{searchQuery}%")) .Take(20).OrderBy(x => x.Title); }