diff options
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); } } |
