aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Barron <barronpm@gmail.com>2021-06-19 15:24:42 -0400
committerPatrick Barron <barronpm@gmail.com>2021-06-19 15:24:42 -0400
commit2a9474f6e706624ce93883b4cb7616937e205f76 (patch)
tree619bd11f76ed2359d5a236d9e23e5df87d702a19
parent6b24cc6d1f9699f246f4f136b42ec583229ad0e2 (diff)
Count records before skipping
-rw-r--r--Jellyfin.Server.Implementations/Devices/DeviceManager.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs
index ab3127669..b87245f0b 100644
--- a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs
+++ b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs
@@ -130,13 +130,13 @@ namespace Jellyfin.Server.Implementations.Devices
devices = devices.Where(device => device.AccessToken == query.AccessToken);
}
+ var count = await devices.CountAsync().ConfigureAwait(false);
+
if (query.Skip.HasValue)
{
devices = devices.Skip(query.Skip.Value);
}
- var count = await devices.CountAsync().ConfigureAwait(false);
-
if (query.Limit.HasValue)
{
devices = devices.Take(query.Limit.Value);