mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 23:58:57 +00:00
GetDeviceOptions always returns an instance of DeviceOptions
This commit is contained in:
@@ -74,13 +74,15 @@ namespace Jellyfin.Server.Implementations.Devices
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<DeviceOptions?> GetDeviceOptions(string deviceId)
|
||||
public async Task<DeviceOptions> GetDeviceOptions(string deviceId)
|
||||
{
|
||||
await using var dbContext = _dbProvider.CreateContext();
|
||||
return await dbContext.DeviceOptions
|
||||
var deviceOptions = await dbContext.DeviceOptions
|
||||
.AsQueryable()
|
||||
.FirstOrDefaultAsync(d => d.DeviceId == deviceId)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
return deviceOptions ?? new DeviceOptions(deviceId);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user