From 943a05bc0901e7dc2b4295815c92a3d1496f0e94 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 4 Jul 2013 14:20:08 -0700 Subject: [PATCH] NzbClub and any indexers with settings are not enabled by default --- NzbDrone.Core/Indexers/IIndexer.cs | 2 ++ NzbDrone.Core/Indexers/IndexerBase.cs | 2 ++ NzbDrone.Core/Indexers/IndexerWithSetting.cs | 5 +++++ NzbDrone.Core/Indexers/NzbClub/NzbClub.cs | 5 +++++ NzbDrone.Core/Indexers/Wombles/Wombles.cs | 10 +++++----- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/NzbDrone.Core/Indexers/IIndexer.cs b/NzbDrone.Core/Indexers/IIndexer.cs index bed871a3e..2d95e490e 100644 --- a/NzbDrone.Core/Indexers/IIndexer.cs +++ b/NzbDrone.Core/Indexers/IIndexer.cs @@ -7,6 +7,8 @@ namespace NzbDrone.Core.Indexers { string Name { get; } + bool EnableByDefault { get; } + IEnumerable DefaultDefinitions { get; } IndexerDefinition InstanceDefinition { get; set; } diff --git a/NzbDrone.Core/Indexers/IndexerBase.cs b/NzbDrone.Core/Indexers/IndexerBase.cs index 19e58df02..34fca36ff 100644 --- a/NzbDrone.Core/Indexers/IndexerBase.cs +++ b/NzbDrone.Core/Indexers/IndexerBase.cs @@ -7,6 +7,8 @@ namespace NzbDrone.Core.Indexers { public abstract string Name { get; } + public virtual bool EnableByDefault { get { return true; } } + public IndexerDefinition InstanceDefinition { get; set; } public virtual IEnumerable DefaultDefinitions diff --git a/NzbDrone.Core/Indexers/IndexerWithSetting.cs b/NzbDrone.Core/Indexers/IndexerWithSetting.cs index 30d275fbd..602b99f84 100644 --- a/NzbDrone.Core/Indexers/IndexerWithSetting.cs +++ b/NzbDrone.Core/Indexers/IndexerWithSetting.cs @@ -7,6 +7,11 @@ namespace NzbDrone.Core.Indexers { public TSetting Settings { get; set; } + public override bool EnableByDefault + { + get { return false; } + } + public TSetting ImportSettingsFromJson(string json) { Settings = Json.Deserialize(json) ?? new TSetting(); diff --git a/NzbDrone.Core/Indexers/NzbClub/NzbClub.cs b/NzbDrone.Core/Indexers/NzbClub/NzbClub.cs index 34d4a0aa8..7ce9022e2 100644 --- a/NzbDrone.Core/Indexers/NzbClub/NzbClub.cs +++ b/NzbDrone.Core/Indexers/NzbClub/NzbClub.cs @@ -10,6 +10,11 @@ namespace NzbDrone.Core.Indexers.NzbClub get { return "NzbClub"; } } + public override bool EnableByDefault + { + get { return false; } + } + public override IParseFeed Parser { get diff --git a/NzbDrone.Core/Indexers/Wombles/Wombles.cs b/NzbDrone.Core/Indexers/Wombles/Wombles.cs index dbc460124..eca0b72f1 100644 --- a/NzbDrone.Core/Indexers/Wombles/Wombles.cs +++ b/NzbDrone.Core/Indexers/Wombles/Wombles.cs @@ -5,6 +5,11 @@ namespace NzbDrone.Core.Indexers.Wombles { public class Wombles : IndexerBase { + public override string Name + { + get { return "WomblesIndex"; } + } + public override IParseFeed Parser { get @@ -18,11 +23,6 @@ namespace NzbDrone.Core.Indexers.Wombles get { yield return "http://nzb.isasecret.com/rss/?sec=TV&fr=false"; } } - public override string Name - { - get { return "WomblesIndex"; } - } - public override IEnumerable GetEpisodeSearchUrls(string seriesTitle, int seasonNumber, int episodeNumber) { return new List();