瀏覽代碼

Update Jellyfin.Server.Implementations/Devices/DeviceManager.cs

Co-authored-by: Bond-009 <bond.009@outlook.com>
gnattu 10 月之前
父節點
當前提交
7f0f93eb4a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Jellyfin.Server.Implementations/Devices/DeviceManager.cs

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

@@ -123,7 +123,7 @@ namespace Jellyfin.Server.Implementations.Devices
         /// <inheritdoc />
         public DeviceInfo? GetDevice(string id)
         {
-            var device = _devices.Values.OrderByDescending(d => d.DateLastActivity).FirstOrDefault(d => d.DeviceId == id);
+            var device = _devices.Values.Where(d => d.DeviceId == id).OrderByDescending(d => d.DateLastActivity).FirstOrDefault();
             _deviceOptions.TryGetValue(id, out var deviceOption);
 
             var deviceInfo = device is null ? null : ToDeviceInfo(device, deviceOption);