コード例 #1
0
ファイル: SyncPlayService.cs プロジェクト: gut5/jellyfin
        /// <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);
        }
コード例 #2
0
        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());
        }
コード例 #3
0
        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());
        }