1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-15 07:22:35 +01:00
Radarr/NzbDrone.Core/Notifications/NotificationBase.cs

28 lines
883 B
C#
Raw Normal View History

2013-07-19 05:47:55 +02:00
using NzbDrone.Common.Serializer;
2013-05-20 01:17:32 +02:00
using NzbDrone.Core.Tv;
namespace NzbDrone.Core.Notifications
{
2013-05-20 04:43:22 +02:00
public abstract class NotificationBase<TSetting> : INotification where TSetting : class, INotifcationSettings, new()
2013-05-20 01:17:32 +02:00
{
public abstract string Name { get; }
public abstract string ImplementationName { get; }
public abstract string Link { get; }
2013-05-20 01:17:32 +02:00
public NotificationDefinition InstanceDefinition { get; set; }
public abstract void OnGrab(string message);
public abstract void OnDownload(string message, Series series);
public abstract void AfterRename(Series series);
2013-05-20 04:43:22 +02:00
public TSetting Settings { get; private set; }
public TSetting ImportSettingsFromJson(string json)
{
Settings = Json.Deserialize<TSetting>(json) ?? new TSetting();
return Settings;
}
2013-05-20 01:17:32 +02:00
}
}