aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifier.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-04-28 23:56:20 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-04-28 23:56:20 -0400
commite9fb806478e974b200b54f8acff5eb09bdef4c32 (patch)
tree6b83c4728d93eb4bc26331d946f500243f5a1f24 /MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifier.cs
parent0f4c28c120751e1cf6e0562ef0445c7fa46cf0a4 (diff)
3.0.5231.40980
Diffstat (limited to 'MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifier.cs')
-rw-r--r--MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifier.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifier.cs b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifier.cs
index 9aa28809f..36ee4a0c9 100644
--- a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifier.cs
+++ b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifier.cs
@@ -67,6 +67,21 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
_sessionManager.PlaybackStart += _sessionManager_PlaybackStart;
_appHost.HasPendingRestartChanged += _appHost_HasPendingRestartChanged;
_appHost.HasUpdateAvailableChanged += _appHost_HasUpdateAvailableChanged;
+ _appHost.ApplicationUpdated += _appHost_ApplicationUpdated;
+ }
+
+ async void _appHost_ApplicationUpdated(object sender, GenericEventArgs<Version> e)
+ {
+ var type = NotificationType.ApplicationUpdateInstalled.ToString();
+
+ var notification = new NotificationRequest
+ {
+ NotificationType = type
+ };
+
+ notification.Variables["Version"] = e.Argument.ToString();
+
+ await SendNotification(notification).ConfigureAwait(false);
}
async void _installationManager_PluginUpdated(object sender, GenericEventArgs<Tuple<IPlugin, PackageVersionInfo>> e)
@@ -302,6 +317,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
_appHost.HasPendingRestartChanged -= _appHost_HasPendingRestartChanged;
_appHost.HasUpdateAvailableChanged -= _appHost_HasUpdateAvailableChanged;
+ _appHost.ApplicationUpdated -= _appHost_ApplicationUpdated;
}
}
}