From 3c6485f0a19d3b0067e70311f3011cac0cd6b036 Mon Sep 17 00:00:00 2001 From: gnattu Date: Sun, 2 Jun 2024 23:05:14 +0800 Subject: [PATCH] Get device id from input Signed-off-by: gnattu --- Jellyfin.Server.Implementations/Devices/DeviceManager.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs index a04d6dd431..be2c02a6aa 100644 --- a/Jellyfin.Server.Implementations/Devices/DeviceManager.cs +++ b/Jellyfin.Server.Implementations/Devices/DeviceManager.cs @@ -199,8 +199,7 @@ namespace Jellyfin.Server.Implementations.Devices /// public async Task DeleteDevice(Device device) { - var id = _devices.FirstOrDefault(x => x.Value.Equals(device)).Key; - _devices.TryRemove(id, out _); + _devices.TryRemove(device.Id, out _); var dbContext = await _dbProvider.CreateDbContextAsync().ConfigureAwait(false); await using (dbContext.ConfigureAwait(false)) {