public void Post(ReportPlaybackStopped request) { request.SessionId = GetSession().Result.Id; var task = _sessionManager.OnPlaybackStopped(request); Task.WaitAll(task); }
public async Task Post(ReportPlaybackStopped request) { Logger.LogDebug("ReportPlaybackStopped PlaySessionId: {0}", request.PlaySessionId ?? string.Empty); if (!string.IsNullOrWhiteSpace(request.PlaySessionId)) { await ApiEntryPoint.Instance.KillTranscodingJobs(_authContext.GetAuthorizationInfo(Request).DeviceId, request.PlaySessionId, s => true); } request.SessionId = GetSession(_sessionContext).Id; await _sessionManager.OnPlaybackStopped(request); }
public void Post(ReportPlaybackStopped request) { if (!string.IsNullOrWhiteSpace(request.PlaySessionId)) { ApiEntryPoint.Instance.KillTranscodingJobs(AuthorizationContext.GetAuthorizationInfo(Request).DeviceId, request.PlaySessionId, s => true); } request.SessionId = GetSession().Result.Id; var task = _sessionManager.OnPlaybackStopped(request); Task.WaitAll(task); }