From 6cc8189461ffea5c38c1aada01b70b5ab69597c4 Mon Sep 17 00:00:00 2001 From: Mikal Stordal Date: Sun, 7 Jan 2024 19:19:51 +0100 Subject: [PATCH] fix: fix pagination total on file search --- Shoko.Server/API/v3/Controllers/FileController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Shoko.Server/API/v3/Controllers/FileController.cs b/Shoko.Server/API/v3/Controllers/FileController.cs index d370819e7..3c1c2b721 100644 --- a/Shoko.Server/API/v3/Controllers/FileController.cs +++ b/Shoko.Server/API/v3/Controllers/FileController.cs @@ -106,7 +106,8 @@ public ActionResult> Search([FromRoute] string query, // Search. var searched = RepoFactory.VideoLocal.GetAll() .Search(query, tuple => tuple.Places.Select(place => place?.FilePath).Where(path => path != null), fuzzy) - .Select(result => result.Result).Skip((page-1)*pageSize).Take(pageSize).ToList(); + .Select(result => result.Result) + .ToList(); return ModelHelper.FilterFiles(searched, User, pageSize, page, include, exclude, include_only, sortOrder, includeDataFrom); }