mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-25 22:37:27 -04:00
@@ -10,6 +10,7 @@ using NzbDrone.Core.Movies;
|
||||
using NzbDrone.Core.Movies.Events;
|
||||
using NzbDrone.Core.Qualities;
|
||||
using NzbDrone.Core.ThingiProvider;
|
||||
using NzbDrone.Core.Update.History.Events;
|
||||
|
||||
namespace NzbDrone.Core.Notifications
|
||||
{
|
||||
@@ -20,6 +21,7 @@ namespace NzbDrone.Core.Notifications
|
||||
IHandle<MoviesDeletedEvent>,
|
||||
IHandle<MovieFileDeletedEvent>,
|
||||
IHandle<HealthCheckFailedEvent>,
|
||||
IHandle<UpdateInstalledEvent>,
|
||||
IHandleAsync<DeleteCompletedEvent>,
|
||||
IHandleAsync<DownloadsProcessedEvent>,
|
||||
IHandleAsync<RenameCompletedEvent>,
|
||||
@@ -162,6 +164,26 @@ namespace NzbDrone.Core.Notifications
|
||||
}
|
||||
}
|
||||
|
||||
public void Handle(UpdateInstalledEvent message)
|
||||
{
|
||||
var updateMessage = new ApplicationUpdateMessage();
|
||||
updateMessage.Message = $"Radarr updated from {message.PreviousVerison.ToString()} to {message.NewVersion.ToString()}";
|
||||
updateMessage.PreviousVersion = message.PreviousVerison;
|
||||
updateMessage.NewVersion = message.NewVersion;
|
||||
|
||||
foreach (var notification in _notificationFactory.OnApplicationUpdateEnabled())
|
||||
{
|
||||
try
|
||||
{
|
||||
notification.OnApplicationUpdate(updateMessage);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Warn(ex, "Unable to send OnApplicationUpdate notification to: " + notification.Definition.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Handle(MovieFileDeletedEvent message)
|
||||
{
|
||||
var deleteMessage = new MovieFileDeleteMessage();
|
||||
|
||||
Reference in New Issue
Block a user