aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-08-21 15:39:41 -0400
committerGitHub <noreply@github.com>2016-08-21 15:39:41 -0400
commit3f6b5feffba3aacbbf0387edffad0428f93ad675 (patch)
treef3eaac4c45a827b111ed4813a8c22ad0e57f6885 /MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs
parent30ba965ed2096139d9064b031e338bf81835aba8 (diff)
parent9f7dbec0db461fe416d825b483d475f476c9d42d (diff)
Merge pull request #2087 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs')
-rw-r--r--MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs17
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);
}
}