فهرست منبع

Count records before skipping

Patrick Barron 4 سال پیش
والد
کامیت
2a9474f6e7
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      Jellyfin.Server.Implementations/Devices/DeviceManager.cs

+ 2 - 2
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);