avoid Take(0) when limit == 0 (#14608)

Co-authored-by: Evan <evan@MacBook-Pro.local>
This commit is contained in:
evan314159
2025-12-09 12:15:46 +08:00
committed by GitHub
parent f24e80701c
commit 8b2a8b94b6
7 changed files with 26 additions and 39 deletions

View File

@@ -158,7 +158,7 @@ namespace Jellyfin.Server.Implementations.Devices
devices = devices.Skip(query.Skip.Value);
}
if (query.Limit.HasValue)
if (query.Limit.HasValue && query.Limit.Value > 0)
{
devices = devices.Take(query.Limit.Value);
}