mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-03 05:34:16 -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 />
|
/// <inheritdoc />
|
||||||
public QueryResult<Device> GetDevices(DeviceQuery query)
|
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.UserId.HasValue || device.UserId.Equals(query.UserId.Value))
|
||||||
.Where(device => query.DeviceId == null || device.DeviceId == query.DeviceId)
|
.Where(device => query.DeviceId == null || device.DeviceId == query.DeviceId)
|
||||||
.Where(device => query.AccessToken == null || device.AccessToken == query.AccessToken)
|
.Where(device => query.AccessToken == null || device.AccessToken == query.AccessToken)
|
||||||
|
.OrderBy(d => d.Id)
|
||||||
.ToList();
|
.ToList();
|
||||||
var count = devices.Count();
|
var count = devices.Count();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user