mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Convert method group to lambda in DeviceManager
This commit is contained in:
parent
784f29f753
commit
3884837513
@ -157,7 +157,7 @@ namespace Jellyfin.Server.Implementations.Devices
|
|||||||
|
|
||||||
return new QueryResult<DeviceInfo>
|
return new QueryResult<DeviceInfo>
|
||||||
{
|
{
|
||||||
Items = devices.Items.Select(ToDeviceInfo).ToList(),
|
Items = devices.Items.Select(device => ToDeviceInfo(device)).ToList(),
|
||||||
StartIndex = devices.StartIndex,
|
StartIndex = devices.StartIndex,
|
||||||
TotalRecordCount = devices.TotalRecordCount
|
TotalRecordCount = devices.TotalRecordCount
|
||||||
};
|
};
|
||||||
@ -185,7 +185,7 @@ namespace Jellyfin.Server.Implementations.Devices
|
|||||||
sessions = sessions.Where(i => CanAccessDevice(user, i.DeviceId));
|
sessions = sessions.Where(i => CanAccessDevice(user, i.DeviceId));
|
||||||
}
|
}
|
||||||
|
|
||||||
var array = await sessions.Select(ToDeviceInfo).ToArrayAsync().ConfigureAwait(false);
|
var array = await sessions.Select(device => ToDeviceInfo(device)).ToArrayAsync().ConfigureAwait(false);
|
||||||
|
|
||||||
return new QueryResult<DeviceInfo>(array);
|
return new QueryResult<DeviceInfo>(array);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user