aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/SessionController.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-08-31 10:32:28 -0600
committercrobibero <cody@robibe.ro>2020-08-31 10:32:28 -0600
commit95402df88408b96300e627b9962d0e4db2e4c7c5 (patch)
tree91cc4d6c271e99256a39f3cacbe1a49bb40ef71a /Jellyfin.Api/Controllers/SessionController.cs
parente48df7da5e3d3eb81f68e71c0fe27a64063f00ac (diff)
parent95142643f6c98fe4380c63ba9b3055fd3a637466 (diff)
Merge remote-tracking branch 'upstream/master' into default-http-client
Diffstat (limited to 'Jellyfin.Api/Controllers/SessionController.cs')
-rw-r--r--Jellyfin.Api/Controllers/SessionController.cs16
1 files changed, 6 insertions, 10 deletions
diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.cs
index 4795fb0cf..ba8d51598 100644
--- a/Jellyfin.Api/Controllers/SessionController.cs
+++ b/Jellyfin.Api/Controllers/SessionController.cs
@@ -153,7 +153,6 @@ namespace Jellyfin.Api.Controllers
/// <param name="itemIds">The ids of the items to play, comma delimited.</param>
/// <param name="startPositionTicks">The starting position of the first item.</param>
/// <param name="playCommand">The type of play command to issue (PlayNow, PlayNext, PlayLast). Clients who have not yet implemented play next and play last may play now.</param>
- /// <param name="playRequest">The <see cref="PlayRequest"/>.</param>
/// <response code="204">Instruction sent to session.</response>
/// <returns>A <see cref="NoContentResult"/>.</returns>
[HttpPost("Sessions/{sessionId}/Playing")]
@@ -163,17 +162,14 @@ namespace Jellyfin.Api.Controllers
[FromRoute, Required] string? sessionId,
[FromQuery] Guid[] itemIds,
[FromQuery] long? startPositionTicks,
- [FromQuery] PlayCommand playCommand,
- [FromBody, Required] PlayRequest playRequest)
+ [FromQuery] PlayCommand playCommand)
{
- if (playRequest == null)
+ var playRequest = new PlayRequest
{
- throw new ArgumentException("Request Body may not be null");
- }
-
- playRequest.ItemIds = itemIds;
- playRequest.StartPositionTicks = startPositionTicks;
- playRequest.PlayCommand = playCommand;
+ ItemIds = itemIds,
+ StartPositionTicks = startPositionTicks,
+ PlayCommand = playCommand
+ };
_sessionManager.SendPlayCommand(
RequestHelpers.GetSession(_sessionManager, _authContext, Request).Id,