/// <summary> /// Handles the specified request. /// </summary> /// <param name="request">The request.</param> public void Post(SyncPlayPlay request) { var currentSession = GetSession(_sessionContext); var syncPlayRequest = new PlaybackRequest() { Type = PlaybackRequestType.Play }; _syncPlayManager.HandleRequest(currentSession, syncPlayRequest, CancellationToken.None); }
public ActionResult SyncPlayPlay() { var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request); var syncPlayRequest = new PlaybackRequest() { Type = PlaybackRequestType.Play }; _syncPlayManager.HandleRequest(currentSession, syncPlayRequest, CancellationToken.None); return(NoContent()); }
public ActionResult SyncPlaySetNewQueue( [FromBody, Required] PlayRequestDto requestData) { var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request); var syncPlayRequest = new PlayGroupRequest( requestData.PlayingQueue, requestData.PlayingItemPosition, requestData.StartPositionTicks); _syncPlayManager.HandleRequest(currentSession, syncPlayRequest, CancellationToken.None); return(NoContent()); }