diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-08-25 14:46:19 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-25 14:46:19 -0400 |
| commit | ba9577f3801105c2f85c061fa7c4c3ee445032ad (patch) | |
| tree | d06d1da4e2284fcf36c36f7ac1ec84c9613ad812 /MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs | |
| parent | 870c843194a8684d1f1098bbed79ecb27cd3478b (diff) | |
| parent | 1ffd9b31577773d3c87c2b6621c8803b2b17e85c (diff) | |
Merge pull request #2101 from MediaBrowser/beta
Beta
Diffstat (limited to 'MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs b/MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs index 620eea774..414fda400 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs +++ b/MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs @@ -54,18 +54,15 @@ namespace MediaBrowser.Server.Implementations.EntryPoints private async void SendMessage(string name, TimerEventInfo info) { - var users = _userManager.Users.Where(i => i.Policy.EnableLiveTvAccess).ToList(); + var users = _userManager.Users.Where(i => i.Policy.EnableLiveTvAccess).Select(i => i.Id.ToString("N")).ToList(); - foreach (var user in users) + try { - try - { - await _sessionManager.SendMessageToUserSessions<TimerEventInfo>(user.Id.ToString("N"), name, info, CancellationToken.None); - } - catch (Exception ex) - { - _logger.ErrorException("Error sending message", ex); - } + await _sessionManager.SendMessageToUserSessions<TimerEventInfo>(users, name, info, CancellationToken.None); + } + catch (Exception ex) + { + _logger.ErrorException("Error sending message", ex); } } |
