1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 02:22:31 +01:00
Radarr/NzbDrone.Core/Notifications/NotificationBase.cs
2013-07-27 13:57:41 -07:00

28 lines
883 B
C#

using NzbDrone.Common.Serializer;
using NzbDrone.Core.Tv;
namespace NzbDrone.Core.Notifications
{
public abstract class NotificationBase<TSetting> : INotification where TSetting : class, INotifcationSettings, new()
{
public abstract string Name { get; }
public abstract string ImplementationName { get; }
public abstract string Link { get; }
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);
public TSetting Settings { get; private set; }
public TSetting ImportSettingsFromJson(string json)
{
Settings = Json.Deserialize<TSetting>(json) ?? new TSetting();
return Settings;
}
}
}