diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/EntryPoints/Notifications')
| -rw-r--r-- | MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/EntryPoints/Notifications/WebSocketNotifier.cs | 9 |
2 files changed, 2 insertions, 15 deletions
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs index b10b64c3e..6a0bb780c 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs +++ b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs @@ -2,14 +2,12 @@ using MediaBrowser.Common.ScheduledTasks; using MediaBrowser.Common.Updates; using MediaBrowser.Controller; -using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Notifications; using MediaBrowser.Controller.Plugins; using MediaBrowser.Controller.Session; -using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Events; using MediaBrowser.Model.Logging; @@ -37,7 +35,6 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications private readonly ITaskManager _taskManager; private readonly INotificationManager _notificationManager; - private readonly IServerConfigurationManager _config; private readonly ILibraryManager _libraryManager; private readonly ISessionManager _sessionManager; private readonly IServerApplicationHost _appHost; @@ -45,14 +42,13 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications private Timer LibraryUpdateTimer { get; set; } private readonly object _libraryChangedSyncLock = new object(); - public Notifications(IInstallationManager installationManager, IUserManager userManager, ILogger logger, ITaskManager taskManager, INotificationManager notificationManager, IServerConfigurationManager config, ILibraryManager libraryManager, ISessionManager sessionManager, IServerApplicationHost appHost) + public Notifications(IInstallationManager installationManager, IUserManager userManager, ILogger logger, ITaskManager taskManager, INotificationManager notificationManager, ILibraryManager libraryManager, ISessionManager sessionManager, IServerApplicationHost appHost) { _installationManager = installationManager; _userManager = userManager; _logger = logger; _taskManager = taskManager; _notificationManager = notificationManager; - _config = config; _libraryManager = libraryManager; _sessionManager = sessionManager; _appHost = appHost; @@ -317,7 +313,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications } } - private string GetItemName(BaseItem item) + public static string GetItemName(BaseItem item) { var name = item.Name; diff --git a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/WebSocketNotifier.cs b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/WebSocketNotifier.cs index 42aadf62e..5f1db03c6 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/WebSocketNotifier.cs +++ b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/WebSocketNotifier.cs @@ -23,7 +23,6 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications public void Run() { _notificationsRepo.NotificationAdded += _notificationsRepo_NotificationAdded; - _notificationsRepo.NotificationUpdated += _notificationsRepo_NotificationUpdated; _notificationsRepo.NotificationsMarkedRead += _notificationsRepo_NotificationsMarkedRead; } @@ -40,13 +39,6 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications _serverManager.SendWebSocketMessage("NotificationsMarkedRead", msg); } - void _notificationsRepo_NotificationUpdated(object sender, NotificationUpdateEventArgs e) - { - var msg = e.Notification.UserId + "|" + e.Notification.Id; - - _serverManager.SendWebSocketMessage("NotificationUpdated", msg); - } - void _notificationsRepo_NotificationAdded(object sender, NotificationUpdateEventArgs e) { var msg = e.Notification.UserId + "|" + e.Notification.Id; @@ -57,7 +49,6 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications public void Dispose() { _notificationsRepo.NotificationAdded -= _notificationsRepo_NotificationAdded; - _notificationsRepo.NotificationUpdated -= _notificationsRepo_NotificationUpdated; } } } |
