/// <summary> /// Posts the specified request. /// </summary> /// <param name="request">The request.</param> public void Post(OnPlaybackProgress request) { var user = _userManager.GetUserById(request.UserId); var item = DtoBuilder.GetItemByClientId(request.Id, _userManager, _libraryManager, user.Id); var task = _sessionManager.OnPlaybackProgress(item, request.PositionTicks, request.IsPaused, GetSession().Id); Task.WaitAll(task); }
/// <summary> /// Posts the specified request. /// </summary> /// <param name="request">The request.</param> public void Post(OnPlaybackProgress request) { var user = _userManager.GetUserById(request.UserId); var item = _dtoService.GetItemByDtoId(request.Id, user.Id); var task = _sessionManager.OnPlaybackProgress(item, request.PositionTicks, request.IsPaused, request.IsMuted, GetSession().Id); Task.WaitAll(task); }
/// <summary> /// Posts the specified request. /// </summary> /// <param name="request">The request.</param> public void Post(OnPlaybackProgress request) { Post(new ReportPlaybackProgress { ItemId = request.Id, PositionTicks = request.PositionTicks, IsMuted = request.IsMuted, IsPaused = request.IsPaused, MediaSourceId = request.MediaSourceId, AudioStreamIndex = request.AudioStreamIndex, SubtitleStreamIndex = request.SubtitleStreamIndex, VolumeLevel = request.VolumeLevel }); }
/// <summary> /// Posts the specified request. /// </summary> /// <param name="request">The request.</param> public void Post(OnPlaybackProgress request) { var user = _userManager.GetUserById(request.UserId); var item = DtoBuilder.GetItemByClientId(request.Id, _userManager, _libraryManager, user.Id); var auth = RequestFilterAttribute.GetAuthorization(RequestContext); if (auth != null) { var task = _userManager.OnPlaybackProgress(user, item, request.PositionTicks, auth["Client"], auth["DeviceId"], auth["Device"] ?? string.Empty); Task.WaitAll(task); } }
/// <summary> /// Posts the specified request. /// </summary> /// <param name="request">The request.</param> public void Post(OnPlaybackProgress request) { Post(new ReportPlaybackProgress { ItemId = new Guid(request.Id), PositionTicks = request.PositionTicks, IsMuted = request.IsMuted, IsPaused = request.IsPaused, MediaSourceId = request.MediaSourceId, AudioStreamIndex = request.AudioStreamIndex, SubtitleStreamIndex = request.SubtitleStreamIndex, VolumeLevel = request.VolumeLevel, PlayMethod = request.PlayMethod, PlaySessionId = request.PlaySessionId, LiveStreamId = request.LiveStreamId, RepeatMode = request.RepeatMode }); }
/// <summary> /// Posts the specified request. /// </summary> /// <param name="request">The request.</param> public void Post(OnPlaybackProgress request) { var user = _userManager.GetUserById(request.UserId); var item = _dtoService.GetItemByDtoId(request.Id, user.Id); var info = new PlaybackProgressInfo { Item = item, PositionTicks = request.PositionTicks, IsMuted = request.IsMuted, IsPaused = request.IsPaused, SessionId = GetSession().Id }; var task = _sessionManager.OnPlaybackProgress(info); Task.WaitAll(task); }