aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/UserViewsController.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2020-11-20 12:34:18 -0500
committerGitHub <noreply@github.com>2020-11-20 12:34:18 -0500
commit7457c4a95d64a798fc4226735f934d20c90a28e2 (patch)
treebc829f18ff731302e1c47642ba357fc25c402f68 /Jellyfin.Api/Controllers/UserViewsController.cs
parent799eb4400576efa798f58bed343b888f60676b68 (diff)
parent5b62f70bc03afe0d1bce702d71635fe57562dd0c (diff)
Merge pull request #4499 from crobibero/more-param
Reduce RequestHelpers.Split usage and remove RequestHelpers.GetGuids
Diffstat (limited to 'Jellyfin.Api/Controllers/UserViewsController.cs')
-rw-r--r--Jellyfin.Api/Controllers/UserViewsController.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/UserViewsController.cs b/Jellyfin.Api/Controllers/UserViewsController.cs
index d575bfc3b..60fd1df01 100644
--- a/Jellyfin.Api/Controllers/UserViewsController.cs
+++ b/Jellyfin.Api/Controllers/UserViewsController.cs
@@ -5,6 +5,7 @@ using System.Globalization;
using System.Linq;
using Jellyfin.Api.Extensions;
using Jellyfin.Api.Helpers;
+using Jellyfin.Api.ModelBinders;
using Jellyfin.Api.Models.UserViewDtos;
using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Entities;
@@ -67,7 +68,7 @@ namespace Jellyfin.Api.Controllers
public ActionResult<QueryResult<BaseItemDto>> GetUserViews(
[FromRoute, Required] Guid userId,
[FromQuery] bool? includeExternalContent,
- [FromQuery] string? presetViews,
+ [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] string[] presetViews,
[FromQuery] bool includeHidden = false)
{
var query = new UserViewQuery
@@ -81,9 +82,9 @@ namespace Jellyfin.Api.Controllers
query.IncludeExternalContent = includeExternalContent.Value;
}
- if (!string.IsNullOrWhiteSpace(presetViews))
+ if (presetViews.Length != 0)
{
- query.PresetViews = RequestHelpers.Split(presetViews, ',', true);
+ query.PresetViews = presetViews;
}
var app = _authContext.GetAuthorizationInfo(Request).Client ?? string.Empty;