From 718545a79b0ba8709609b176ebb3922d6fa8eb6d Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 19 Sep 2015 22:06:56 -0400 Subject: update metadata editor --- .../Notifications/NotificationManager.cs | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Notifications/NotificationManager.cs') diff --git a/MediaBrowser.Server.Implementations/Notifications/NotificationManager.cs b/MediaBrowser.Server.Implementations/Notifications/NotificationManager.cs index 1ff928cd5..f19ff8a5f 100644 --- a/MediaBrowser.Server.Implementations/Notifications/NotificationManager.cs +++ b/MediaBrowser.Server.Implementations/Notifications/NotificationManager.cs @@ -230,8 +230,19 @@ namespace MediaBrowser.Server.Implementations.Notifications private bool IsEnabled(INotificationService service, string notificationType) { - return string.IsNullOrEmpty(notificationType) || - GetConfiguration().IsServiceEnabled(service.Name, notificationType); + if (string.IsNullOrEmpty(notificationType)) + { + return true; + } + + var configurable = service as IConfigurableNotificationService; + + if (configurable != null) + { + return configurable.IsEnabled(notificationType); + } + + return GetConfiguration().IsServiceEnabled(service.Name, notificationType); } public void AddParts(IEnumerable services, IEnumerable notificationTypeFactories) @@ -268,7 +279,13 @@ namespace MediaBrowser.Server.Implementations.Notifications public IEnumerable GetNotificationServices() { - return _services.Select(i => new NotificationServiceInfo + return _services.Where(i => + { + var configurable = i as IConfigurableNotificationService; + + return configurable == null || !configurable.IsHidden; + + }).Select(i => new NotificationServiceInfo { Name = i.Name, Id = i.Name.GetMD5().ToString("N") -- cgit v1.2.3