mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-05 18:01:55 +01:00
Merge pull request #16490 from theguymadmax/fix-nested-boxsets-query
Some checks are pending
CodeQL / Analyze (csharp) (push) Waiting to run
Tests / run-tests (macos-latest) (push) Waiting to run
Tests / run-tests (ubuntu-latest) (push) Waiting to run
Tests / run-tests (windows-latest) (push) Waiting to run
OpenAPI Publish / OpenAPI - Publish Artifact (push) Waiting to run
OpenAPI Publish / OpenAPI - Publish Unstable Spec (push) Blocked by required conditions
OpenAPI Publish / OpenAPI - Publish Stable Spec (push) Blocked by required conditions
Project Automation / Project board (push) Waiting to run
Merge Conflict Labeler / Labeling (push) Waiting to run
Some checks are pending
CodeQL / Analyze (csharp) (push) Waiting to run
Tests / run-tests (macos-latest) (push) Waiting to run
Tests / run-tests (ubuntu-latest) (push) Waiting to run
Tests / run-tests (windows-latest) (push) Waiting to run
OpenAPI Publish / OpenAPI - Publish Artifact (push) Waiting to run
OpenAPI Publish / OpenAPI - Publish Unstable Spec (push) Blocked by required conditions
OpenAPI Publish / OpenAPI - Publish Stable Spec (push) Blocked by required conditions
Project Automation / Project board (push) Waiting to run
Merge Conflict Labeler / Labeling (push) Waiting to run
Fix BoxSet parentId being ignored in item queries
This commit is contained in:
@@ -11,6 +11,7 @@ using Jellyfin.Extensions;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Controller.Dto;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Movies;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Session;
|
||||
using MediaBrowser.Model.Dto;
|
||||
@@ -270,15 +271,17 @@ public class ItemsController : BaseJellyfinApiController
|
||||
var dtoOptions = new DtoOptions { Fields = fields }
|
||||
.AddAdditionalDtoOptions(enableImages, enableUserData, imageTypeLimit, enableImageTypes);
|
||||
|
||||
if (includeItemTypes.Length == 1
|
||||
&& includeItemTypes[0] == BaseItemKind.BoxSet)
|
||||
{
|
||||
parentId = null;
|
||||
}
|
||||
|
||||
var item = _libraryManager.GetParentItem(parentId, userId);
|
||||
QueryResult<BaseItem> result;
|
||||
|
||||
if (includeItemTypes.Length == 1
|
||||
&& includeItemTypes[0] == BaseItemKind.BoxSet
|
||||
&& item is not BoxSet)
|
||||
{
|
||||
parentId = null;
|
||||
item = _libraryManager.GetUserRootFolder();
|
||||
}
|
||||
|
||||
if (item is not Folder folder)
|
||||
{
|
||||
folder = _libraryManager.GetUserRootFolder();
|
||||
|
||||
Reference in New Issue
Block a user