mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-24 02:02:29 -04:00
Update Jellyfin.Server.Implementations/Devices/DeviceManager.cs
Co-authored-by: Bond-009 <bond.009@outlook.com>
This commit is contained in:
parent
7f0f93eb4a
commit
1739962f52
@ -133,10 +133,11 @@ namespace Jellyfin.Server.Implementations.Devices
|
||||
/// <inheritdoc />
|
||||
public QueryResult<Device> GetDevices(DeviceQuery query)
|
||||
{
|
||||
IEnumerable<Device> devices = _devices.Values.OrderBy(d => d.Id)
|
||||
IEnumerable<Device> devices = _devices.Values
|
||||
.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)
|
||||
.OrderBy(d => d.Id)
|
||||
.ToList();
|
||||
var count = devices.Count();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user