mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 14:03:03 +03:00
Reduce RequestHelpers.Split usage and remove RequestHelpers.GetGuids usage.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user