aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/ChannelsController.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/ChannelsController.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/ChannelsController.cs')
-rw-r--r--Jellyfin.Api/Controllers/ChannelsController.cs8
1 files changed, 2 insertions, 6 deletions
diff --git a/Jellyfin.Api/Controllers/ChannelsController.cs b/Jellyfin.Api/Controllers/ChannelsController.cs
index ec9d7cdce..c4dc44cc3 100644
--- a/Jellyfin.Api/Controllers/ChannelsController.cs
+++ b/Jellyfin.Api/Controllers/ChannelsController.cs
@@ -198,7 +198,7 @@ namespace Jellyfin.Api.Controllers
[FromQuery] int? limit,
[FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ItemFilter[] filters,
[FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ItemFields[] fields,
- [FromQuery] string? channelIds)
+ [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] Guid[] channelIds)
{
var user = userId.HasValue && !userId.Equals(Guid.Empty)
? _userManager.GetUserById(userId.Value)
@@ -208,11 +208,7 @@ namespace Jellyfin.Api.Controllers
{
Limit = limit,
StartIndex = startIndex,
- ChannelIds = (channelIds ?? string.Empty)
- .Split(',')
- .Where(i => !string.IsNullOrWhiteSpace(i))
- .Select(i => new Guid(i))
- .ToArray(),
+ ChannelIds = channelIds,
DtoOptions = new DtoOptions { Fields = fields }
};