diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-11-21 22:54:40 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-21 22:54:40 +0000 |
| commit | e8cb9cea7d04da5896cdb2ac1f71b764e8143faa (patch) | |
| tree | 37e5324e49e628b2ce1cd5a86a96d181844177b6 /Jellyfin.Api/Controllers/StudiosController.cs | |
| parent | 4a22380565bbf5909ad064461ae9cb59a410a063 (diff) | |
| parent | 77dba0d06b9dd9417b59a704a74af38ba08ff02d (diff) | |
Merge branch 'master' into library_scan_speed
Diffstat (limited to 'Jellyfin.Api/Controllers/StudiosController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/StudiosController.cs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Jellyfin.Api/Controllers/StudiosController.cs b/Jellyfin.Api/Controllers/StudiosController.cs index 27dcd51bc..5090bf1de 100644 --- a/Jellyfin.Api/Controllers/StudiosController.cs +++ b/Jellyfin.Api/Controllers/StudiosController.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations; using Jellyfin.Api.Constants; using Jellyfin.Api.Extensions; @@ -73,8 +73,8 @@ namespace Jellyfin.Api.Controllers [FromQuery] string? searchTerm, [FromQuery] string? parentId, [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ItemFields[] fields, - [FromQuery] string? excludeItemTypes, - [FromQuery] string? includeItemTypes, + [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] string[] excludeItemTypes, + [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] string[] includeItemTypes, [FromQuery] bool? isFavorite, [FromQuery] bool? enableUserData, [FromQuery] int? imageTypeLimit, @@ -94,13 +94,10 @@ namespace Jellyfin.Api.Controllers var parentItem = _libraryManager.GetParentItem(parentId, userId); - var excludeItemTypesArr = RequestHelpers.Split(excludeItemTypes, ',', true); - var includeItemTypesArr = RequestHelpers.Split(includeItemTypes, ',', true); - var query = new InternalItemsQuery(user) { - ExcludeItemTypes = excludeItemTypesArr, - IncludeItemTypes = includeItemTypesArr, + ExcludeItemTypes = excludeItemTypes, + IncludeItemTypes = includeItemTypes, StartIndex = startIndex, Limit = limit, IsFavorite = isFavorite, @@ -125,7 +122,7 @@ namespace Jellyfin.Api.Controllers } var result = _libraryManager.GetStudios(query); - var shouldIncludeItemTypes = !string.IsNullOrEmpty(includeItemTypes); + var shouldIncludeItemTypes = includeItemTypes.Length != 0; return RequestHelpers.CreateQueryResult(result, dtoOptions, _dtoService, shouldIncludeItemTypes, user); } |
