diff options
| author | hatharry <hatharry@hotmail.com> | 2016-08-29 01:27:43 +1200 |
|---|---|---|
| committer | hatharry <hatharry@hotmail.com> | 2016-08-29 01:27:43 +1200 |
| commit | cabf2cdc1be4c06714ac6bcf835a19d2f652a6e2 (patch) | |
| tree | d375b8a41e9fd40a2569ceea6b02e4f8237db797 /MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs | |
| parent | e564b54686029a90595e1bb4277f87490763e183 (diff) | |
| parent | c974641a352685b2e6595dd7b291843c8e6364ac (diff) | |
Merge branch 'dev' of https://github.com/hatharry/Emby.git
Diffstat (limited to 'MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs b/MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs index cc4ef1972..414fda400 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs +++ b/MediaBrowser.Server.Implementations/EntryPoints/RecordingNotifier.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading; -using System.Threading.Tasks; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.Plugins; @@ -57,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); } } |
