diff options
| author | Shadowghost <Shadowghost@users.noreply.github.com> | 2023-05-15 14:45:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-15 06:45:33 -0600 |
| commit | eb52af4e6ab0a81b026063b2dd43dd81a1a08b8e (patch) | |
| tree | 2a60e11344cd1132eaa93878caf7f97e26b91d1e /Jellyfin.Api/Controllers/ItemsController.cs | |
| parent | 603fce59df780626c3269eaa94d95504e823b2f6 (diff) | |
Fix playlists library and migration (#9770)
Diffstat (limited to 'Jellyfin.Api/Controllers/ItemsController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/ItemsController.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Jellyfin.Api/Controllers/ItemsController.cs b/Jellyfin.Api/Controllers/ItemsController.cs index 377526729..d4116116b 100644 --- a/Jellyfin.Api/Controllers/ItemsController.cs +++ b/Jellyfin.Api/Controllers/ItemsController.cs @@ -503,6 +503,7 @@ public class ItemsController : BaseJellyfinApiController } } + query.Parent = null; result = folder.GetItems(query); } else @@ -511,10 +512,12 @@ public class ItemsController : BaseJellyfinApiController result = new QueryResult<BaseItem>(itemsArray); } + // result might include items not accessible by the user, DtoService will remove them + var accessibleItems = _dtoService.GetBaseItemDtos(result.Items, dtoOptions, user); return new QueryResult<BaseItemDto>( startIndex, - result.TotalRecordCount, - _dtoService.GetBaseItemDtos(result.Items, dtoOptions, user)); + accessibleItems.Count, + accessibleItems); } /// <summary> |
