コード例 #1
0
        private async void SendMessage(string name, TimerEventInfo info)
        {
            var users = _userManager.Users.Where(i => i.Policy.EnableLiveTvAccess).Select(i => i.Id.ToString("N")).ToList();

            try
            {
                await _sessionManager.SendMessageToUserSessions <TimerEventInfo>(users, name, info, CancellationToken.None);
            }
            catch (Exception ex)
            {
                _logger.ErrorException("Error sending message", ex);
            }
        }
コード例 #2
0
        private async void SendMessage(string name, TimerEventInfo info)
        {
            var users = _userManager.Users.Where(i => i.Policy.EnableLiveTvAccess).Select(i => i.Id).ToList();

            try
            {
                await _sessionManager.SendMessageToUserSessions(users, name, info, CancellationToken.None).ConfigureAwait(false);
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Error sending message");
            }
        }
コード例 #3
0
ファイル: RecordingNotifier.cs プロジェクト: xyl0101/jellyfin
        private async void SendMessage(string name, TimerEventInfo info)
        {
            var users = _userManager.Users.Where(i => i.Policy.EnableLiveTvAccess).Select(i => i.Id).ToList();

            try
            {
                await _sessionManager.SendMessageToUserSessions(users, name, info, CancellationToken.None);
            }
            catch (ObjectDisposedException)
            {
                // TODO Log exception or Investigate and properly fix.
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Error sending message");
            }
        }