diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2020-11-20 12:34:18 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-20 12:34:18 -0500 |
| commit | 7457c4a95d64a798fc4226735f934d20c90a28e2 (patch) | |
| tree | bc829f18ff731302e1c47642ba357fc25c402f68 /Jellyfin.Api/Controllers/SearchController.cs | |
| parent | 799eb4400576efa798f58bed343b888f60676b68 (diff) | |
| parent | 5b62f70bc03afe0d1bce702d71635fe57562dd0c (diff) | |
Merge pull request #4499 from crobibero/more-param
Reduce RequestHelpers.Split usage and remove RequestHelpers.GetGuids
Diffstat (limited to 'Jellyfin.Api/Controllers/SearchController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/SearchController.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Jellyfin.Api/Controllers/SearchController.cs b/Jellyfin.Api/Controllers/SearchController.cs index e75f0d06b..076fe58f1 100644 --- a/Jellyfin.Api/Controllers/SearchController.cs +++ b/Jellyfin.Api/Controllers/SearchController.cs @@ -5,6 +5,7 @@ using System.Globalization; using System.Linq; using Jellyfin.Api.Constants; using Jellyfin.Api.Helpers; +using Jellyfin.Api.ModelBinders; using MediaBrowser.Controller.Drawing; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; @@ -82,9 +83,9 @@ namespace Jellyfin.Api.Controllers [FromQuery] int? limit, [FromQuery] Guid? userId, [FromQuery, Required] string searchTerm, - [FromQuery] string? includeItemTypes, - [FromQuery] string? excludeItemTypes, - [FromQuery] string? mediaTypes, + [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] string[] includeItemTypes, + [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] string[] excludeItemTypes, + [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] string[] mediaTypes, [FromQuery] string? parentId, [FromQuery] bool? isMovie, [FromQuery] bool? isSeries, @@ -108,9 +109,9 @@ namespace Jellyfin.Api.Controllers IncludeStudios = includeStudios, StartIndex = startIndex, UserId = userId ?? Guid.Empty, - IncludeItemTypes = RequestHelpers.Split(includeItemTypes, ',', true), - ExcludeItemTypes = RequestHelpers.Split(excludeItemTypes, ',', true), - MediaTypes = RequestHelpers.Split(mediaTypes, ',', true), + IncludeItemTypes = includeItemTypes, + ExcludeItemTypes = excludeItemTypes, + MediaTypes = mediaTypes, ParentId = parentId, IsKids = isKids, |
