1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-19 07:52:33 +02:00
Radarr/NzbDrone.Core/Indexers/IndexerWithSetting.cs

21 lines
532 B
C#
Raw Normal View History

2013-05-12 17:18:17 +02:00
using NzbDrone.Common.Serializer;
2013-04-11 01:44:48 +02:00
namespace NzbDrone.Core.Indexers
{
public abstract class IndexerWithSetting<TSetting> : IndexerBase where TSetting : class, IIndexerSetting, new()
2013-04-11 01:44:48 +02:00
{
2013-06-04 05:33:03 +02:00
public TSetting Settings { get; set; }
2013-04-11 01:44:48 +02:00
public override bool EnableByDefault
{
get { return false; }
}
public TSetting ImportSettingsFromJson(string json)
2013-04-11 01:44:48 +02:00
{
2013-05-13 04:52:55 +02:00
Settings = Json.Deserialize<TSetting>(json) ?? new TSetting();
return Settings;
2013-04-11 01:44:48 +02:00
}
}
}