瀏覽代碼

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

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

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

@@ -133,10 +133,11 @@ namespace Jellyfin.Server.Implementations.Devices
         /// <inheritdoc />
         public QueryResult<Device> GetDevices(DeviceQuery query)
         {
-            IEnumerable<Device> devices = _devices.Values.OrderBy(d => d.Id)
+            IEnumerable<Device> devices = _devices.Values
                 .Where(device => !query.UserId.HasValue || device.UserId.Equals(query.UserId.Value))
                 .Where(device => query.DeviceId == null || device.DeviceId == query.DeviceId)
                 .Where(device => query.AccessToken == null || device.AccessToken == query.AccessToken)
+                .OrderBy(d => d.Id)
                 .ToList();
             var count = devices.Count();