aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library
diff options
context:
space:
mode:
authorevan314159 <110177090+evan314159@users.noreply.github.com>2025-12-09 12:15:46 +0800
committerGitHub <noreply@github.com>2025-12-08 21:15:46 -0700
commit8b2a8b94b6361e31eff58078225cf78d8a6c3fb1 (patch)
treef19d6c4cac15b2f23f216fda2bf79c4218ed4edc /Emby.Server.Implementations/Library
parentf24e80701cca2398b9efea8605bd406ff36f3746 (diff)
avoid Take(0) when limit == 0 (#14608)
Co-authored-by: Evan <evan@MacBook-Pro.local>
Diffstat (limited to 'Emby.Server.Implementations/Library')
-rw-r--r--Emby.Server.Implementations/Library/SearchEngine.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Library/SearchEngine.cs b/Emby.Server.Implementations/Library/SearchEngine.cs
index 9d81b835c..c68211859 100644
--- a/Emby.Server.Implementations/Library/SearchEngine.cs
+++ b/Emby.Server.Implementations/Library/SearchEngine.cs
@@ -42,7 +42,7 @@ namespace Emby.Server.Implementations.Library
results = results.GetRange(query.StartIndex.Value, totalRecordCount - query.StartIndex.Value);
}
- if (query.Limit.HasValue)
+ if (query.Limit.HasValue && query.Limit.Value > 0)
{
results = results.GetRange(0, Math.Min(query.Limit.Value, results.Count));
}