New: OnApplicationUpdate Notifications

(based on Radarr Commits
9e175e28efcfc6ac3e414649b955a10fb0e951e7
4f5f9ff77ee4de05ba04cc677eb7baf4df726af5
4ebcbc28aa3e3268ecc37c5fc2b5565da8f13305
)
Fixes #723

Co-authored-by: Qstick <qstick@gmail.com>
This commit is contained in:
bakerboy448
2021-12-22 17:38:42 -06:00
committed by Qstick
parent 80c31e8660
commit 5e3322c538
31 changed files with 373 additions and 23 deletions
@@ -10,6 +10,7 @@ namespace NzbDrone.Core.Notifications
public interface INotificationFactory : IProviderFactory<INotification, NotificationDefinition>
{
List<INotification> OnHealthIssueEnabled();
List<INotification> OnApplicationUpdateEnabled();
}
public class NotificationFactory : ProviderFactory<INotification, NotificationDefinition>, INotificationFactory
@@ -24,11 +25,17 @@ 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);
definition.SupportsOnHealthIssue = provider.SupportsOnHealthIssue;
definition.SupportsOnApplicationUpdate = provider.SupportsOnApplicationUpdate;
}
}
}