Browse Source

Always enumerate to get count

Signed-off-by: gnattu <gnattuoc@me.com>
gnattu 1 year ago
parent
commit
7403428864
1 changed files with 1 additions and 5 deletions
  1. 1 5
      Jellyfin.Server.Implementations/Devices/DeviceManager.cs

+ 1 - 5
Jellyfin.Server.Implementations/Devices/DeviceManager.cs

@@ -143,11 +143,7 @@ namespace Jellyfin.Server.Implementations.Devices
                 .Where(device => !query.UserId.HasValue || device.UserId.Equals(query.UserId.Value))
                 .Where(device => query.DeviceId == null || device.DeviceId == query.DeviceId)
                 .Where(device => query.AccessToken == null || device.AccessToken == query.AccessToken);
-            var canGetCountDirectly = devices.TryGetNonEnumeratedCount(out var count);
-            if (!canGetCountDirectly)
-            {
-                count = devices.Count();
-            }
+            var count = devices.Count();
 
             if (query.Skip.HasValue)
             {