1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-01-19 10:54:05 +02:00
Sonarr/NzbDrone.Core/Indexers/IndexerWithSetting.cs

21 lines
532 B
C#
Raw Normal View History

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