1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-25 22:37:27 -04:00

New: Movie Added Notification

This commit is contained in:
Qstick
2022-06-02 20:44:47 -05:00
parent a8695959f1
commit f890aadffa
33 changed files with 234 additions and 4 deletions
@@ -19,6 +19,7 @@ namespace NzbDrone.Core.Notifications
IHandle<MovieGrabbedEvent>,
IHandle<MovieImportedEvent>,
IHandle<MoviesDeletedEvent>,
IHandle<MovieAddedEvent>,
IHandle<MovieFileDeletedEvent>,
IHandle<HealthCheckFailedEvent>,
IHandle<UpdateInstalledEvent>,
@@ -155,6 +156,24 @@ namespace NzbDrone.Core.Notifications
}
}
public void Handle(MovieAddedEvent message)
{
foreach (var notification in _notificationFactory.OnMovieAddedEnabled())
{
try
{
if (ShouldHandleMovie(notification.Definition, message.Movie))
{
notification.OnMovieAdded(message.Movie);
}
}
catch (Exception ex)
{
_logger.Warn(ex, "Unable to send OnMovieAdded notification to: " + notification.Definition.Name);
}
}
}
public void Handle(MovieRenamedEvent message)
{
foreach (var notification in _notificationFactory.OnRenameEnabled())