2017-09-04 02:20:56 +00:00
|
|
|
|
using NzbDrone.Core.Notifications;
|
|
|
|
|
|
2017-10-31 01:28:29 +00:00
|
|
|
|
namespace Lidarr.Api.V1.Notifications
|
2017-09-04 02:20:56 +00:00
|
|
|
|
{
|
|
|
|
|
public class NotificationModule : ProviderModuleBase<NotificationResource, INotification, NotificationDefinition>
|
|
|
|
|
{
|
|
|
|
|
public static readonly NotificationResourceMapper ResourceMapper = new NotificationResourceMapper();
|
|
|
|
|
|
|
|
|
|
public NotificationModule(NotificationFactory notificationFactory)
|
|
|
|
|
: base(notificationFactory, "notification", ResourceMapper)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void Validate(NotificationDefinition definition, bool includeWarnings)
|
|
|
|
|
{
|
2020-01-03 12:49:24 +00:00
|
|
|
|
if (!definition.Enable)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2017-09-04 02:20:56 +00:00
|
|
|
|
base.Validate(definition, includeWarnings);
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-03-22 00:47:54 +00:00
|
|
|
|
}
|