The Free Software Media System - Server Backend & API
Use GeneralCommandType in SessionController parameters
Niels van Velzen891c538f818b
diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.csindex 5a2a3cdc09..c257a46dcf 100644--- a/Jellyfin.Api/Controllers/SessionController.cs+++ b/Jellyfin.Api/Controllers/SessionController.cs@@ -215,17 +215,12 @@ namespace Jellyfin.Api.Controllers[ProducesResponseType(StatusCodes.Status204NoContent)]public ActionResult SendSystemCommand([FromRoute, Required] string sessionId,- [FromRoute, Required] string command)+ [FromRoute, Required] GeneralCommandType command){- if (!Enum.TryParse(command, true, out GeneralCommandType commandType))- {- return BadRequest();- }-var currentSession = RequestHelpers.GetSession(_sessionManager, _authContext, Request);var generalCommand = new GeneralCommand{- Name = commandType,+ Name = command,ControllingUserId = currentSession.UserId};@@ -246,18 +241,13 @@ namespace Jellyfin.Api.Controllers[ProducesResponseType(StatusCodes.Status204NoContent)]public ActionResult SendGeneralCommand([FromRoute, Required] string sessionId,- [FromRoute, Required] string command)+ [FromRoute, Required] GeneralCommandType command){- if (!Enum.TryParse(command, true, out GeneralCommandType commandType))- {- return BadRequest();- }-var currentSession = RequestHelpers.GetSession(_sessionManager, _authContext, Request);var generalCommand = new GeneralCommand{- Name = commandType,+ Name = command,ControllingUserId = currentSession.UserId};