aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifier.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifier.cs')
-rw-r--r--MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifier.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifier.cs b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifier.cs
index 2a3668dfa..bb03c09e6 100644
--- a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifier.cs
+++ b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifier.cs
@@ -2,6 +2,7 @@
using MediaBrowser.Common.Plugins;
using MediaBrowser.Common.ScheduledTasks;
using MediaBrowser.Common.Updates;
+using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Notifications;
@@ -27,6 +28,8 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
private readonly ITaskManager _taskManager;
private readonly INotificationManager _notificationManager;
+ private IServerConfigurationManager _config;
+
public Notifications(IInstallationManager installationManager, IUserManager userManager, ILogger logger, ITaskManager taskManager, INotificationManager notificationManager)
{
_installationManager = installationManager;
@@ -75,7 +78,8 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
{
var result = e.Argument;
- if (result.Status == TaskCompletionStatus.Failed)
+ if (result.Status == TaskCompletionStatus.Failed &&
+ _config.Configuration.NotificationOptions.SendOnFailedTasks)
{
var userIds = _userManager
.Users
@@ -130,6 +134,11 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
async void _installationManager_PackageInstallationCompleted(object sender, InstallationEventArgs e)
{
+ if (!_config.Configuration.NotificationOptions.SendOnUpdates)
+ {
+ return;
+ }
+
var installationInfo = e.InstallationInfo;
var userIds = _userManager