From 7403428864a954e27b50cd9b075a40477b3ff8d8 Mon Sep 17 00:00:00 2001 From: gnattu Date: Sun, 2 Jun 2024 21:32:58 +0800 Subject: [PATCH] Always enumerate to get count Signed-off-by: gnattu --- Jellyfin.Server.Implementations/Devices/DeviceManager.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs index 28794ada2d..e676275632 100644 --- a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs +++ b/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) {