소스 검색

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