diff options
Diffstat (limited to 'Jellyfin.Server.Implementations/Devices/DeviceManager.cs')
| -rw-r--r-- | Jellyfin.Server.Implementations/Devices/DeviceManager.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs index c942678d9..0d93ee2bf 100644 --- a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs +++ b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs @@ -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 /> |
