mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-15 02:33:33 +01:00
Make device/session code async
This commit is contained in:
@@ -53,12 +53,13 @@ namespace Jellyfin.Server.Implementations.Devices
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public DeviceOptions? GetDeviceOptions(string deviceId)
|
||||
public async Task<DeviceOptions?> GetDeviceOptions(string deviceId)
|
||||
{
|
||||
using var dbContext = _dbProvider.CreateContext();
|
||||
return dbContext.DeviceOptions
|
||||
await using var dbContext = _dbProvider.CreateContext();
|
||||
return await dbContext.DeviceOptions
|
||||
.AsQueryable()
|
||||
.FirstOrDefault(d => d.DeviceId == deviceId);
|
||||
.FirstOrDefaultAsync(d => d.DeviceId == deviceId)
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user