aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/SessionController.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-11-16 20:29:46 -0700
committercrobibero <cody@robibe.ro>2020-11-16 20:29:46 -0700
commit3cc0dd7e12380a7e4a0ef86591890ece8421b14c (patch)
tree69b66e767026ef6abc15d757a57b1be4f0ccadcf /Jellyfin.Api/Controllers/SessionController.cs
parentbe0ddf02b3130ea5b6e4778201f784bcd031b72e (diff)
Reduce RequestHelpers.Split usage and remove RequestHelpers.GetGuids usage.
Diffstat (limited to 'Jellyfin.Api/Controllers/SessionController.cs')
-rw-r--r--Jellyfin.Api/Controllers/SessionController.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.cs
index e506ac7bf..6c9b9050e 100644
--- a/Jellyfin.Api/Controllers/SessionController.cs
+++ b/Jellyfin.Api/Controllers/SessionController.cs
@@ -160,12 +160,12 @@ namespace Jellyfin.Api.Controllers
public ActionResult Play(
[FromRoute, Required] string sessionId,
[FromQuery, Required] PlayCommand playCommand,
- [FromQuery, Required] string itemIds,
+ [FromQuery, Required, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] Guid[] itemIds,
[FromQuery] long? startPositionTicks)
{
var playRequest = new PlayRequest
{
- ItemIds = RequestHelpers.GetGuids(itemIds),
+ ItemIds = itemIds,
StartPositionTicks = startPositionTicks,
PlayCommand = playCommand
};
@@ -378,7 +378,7 @@ namespace Jellyfin.Api.Controllers
[ProducesResponseType(StatusCodes.Status204NoContent)]
public ActionResult PostCapabilities(
[FromQuery] string? id,
- [FromQuery] string? playableMediaTypes,
+ [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] string[] playableMediaTypes,
[FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] GeneralCommandType[] supportedCommands,
[FromQuery] bool supportsMediaControl = false,
[FromQuery] bool supportsSync = false,
@@ -391,7 +391,7 @@ namespace Jellyfin.Api.Controllers
_sessionManager.ReportCapabilities(id, new ClientCapabilities
{
- PlayableMediaTypes = RequestHelpers.Split(playableMediaTypes, ',', true),
+ PlayableMediaTypes = playableMediaTypes,
SupportedCommands = supportedCommands,
SupportsMediaControl = supportsMediaControl,
SupportsSync = supportsSync,