mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Always enumerate to get count
Signed-off-by: gnattu <gnattuoc@me.com>
This commit is contained in:
parent
235da65a75
commit
7403428864
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user