소스 검색

Get device id from input

Signed-off-by: gnattu <gnattuoc@me.com>
gnattu 1 년 전
부모
커밋
3c6485f0a1
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      Jellyfin.Server.Implementations/Devices/DeviceManager.cs

+ 1 - 2
Jellyfin.Server.Implementations/Devices/DeviceManager.cs

@@ -199,8 +199,7 @@ namespace Jellyfin.Server.Implementations.Devices
         /// <inheritdoc />
         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))
             {