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

New: OnApplicationUpdate Notifications (#6854)

Fixes #4681
[common]
This commit is contained in:
Qstick
2021-12-20 23:12:12 -06:00
committed by GitHub
parent 4d2a311e40
commit 9e175e28ef
35 changed files with 293 additions and 5 deletions
@@ -17,6 +17,7 @@ namespace NzbDrone.Core.Notifications
List<INotification> OnMovieDeleteEnabled();
List<INotification> OnMovieFileDeleteEnabled();
List<INotification> OnHealthIssueEnabled();
List<INotification> OnApplicationUpdateEnabled();
}
public class NotificationFactory : ProviderFactory<INotification, NotificationDefinition>, INotificationFactory
@@ -66,6 +67,11 @@ namespace NzbDrone.Core.Notifications
return GetAvailableProviders().Where(n => ((NotificationDefinition)n.Definition).OnHealthIssue).ToList();
}
public List<INotification> OnApplicationUpdateEnabled()
{
return GetAvailableProviders().Where(n => ((NotificationDefinition)n.Definition).OnApplicationUpdate).ToList();
}
public override void SetProviderCharacteristics(INotification provider, NotificationDefinition definition)
{
base.SetProviderCharacteristics(provider, definition);
@@ -78,6 +84,7 @@ namespace NzbDrone.Core.Notifications
definition.SupportsOnMovieFileDelete = provider.SupportsOnMovieFileDelete;
definition.SupportsOnMovieFileDeleteForUpgrade = provider.SupportsOnMovieFileDeleteForUpgrade;
definition.SupportsOnHealthIssue = provider.SupportsOnHealthIssue;
definition.SupportsOnApplicationUpdate = provider.SupportsOnApplicationUpdate;
}
}
}