فهرست منبع

Resolve a System.IndexOutOfRangeException when requesting IDs that do not exist via /Users/.../Items. Previously it was possible for the 'index' values in 'positions' to refer beyond 'size'.

[ERR] Error processing request. URL "GET" "/Users/.../Items".
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at MediaBrowser.Controller.Entities.Folder.SortItemsByRequest(InternalItemsQuery query, IReadOnlyList`1 items)
   at MediaBrowser.Controller.Entities.Folder.GetItems(InternalItemsQuery query)
   at Jellyfin.Api.Controllers.ItemsController.GetItems
Luke F 2 سال پیش
والد
کامیت
3bd2cc9860
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      MediaBrowser.Controller/Entities/Folder.cs

+ 1 - 1
MediaBrowser.Controller/Entities/Folder.cs

@@ -901,7 +901,7 @@ namespace MediaBrowser.Controller.Entities
             int index = 0;
             for (int i = 0; i < ids.Length; i++)
             {
-                if (positions.TryAdd(ids[i], index))
+                if (items.Any(item => item.Id == ids[i]) && positions.TryAdd(ids[i], index))
                 {
                     index++;
                 }