From 53e6b6038216f7982f6d116e5f9240f59e78c4d7 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Thu, 19 May 2011 21:21:18 -0700 Subject: [PATCH] Renamed IndexerProviderBase to IndexerBase since its no longer a provider --- NzbDrone.Core.Test/IndexerProviderTest.cs | 14 +++++++------- NzbDrone.Core/CentralDispatch.cs | 10 +++++----- NzbDrone.Core/NzbDrone.Core.csproj | 10 +++++----- .../{IndexerProviderBase.cs => IndexerBase.cs} | 4 ++-- .../Indexer/{NewzbinProvider.cs => Newzbin.cs} | 4 ++-- .../{NzbMatrixProvider.cs => NzbMatrix.cs} | 4 ++-- .../Indexer/{NzbsOrgProvider.cs => NzbsOrg.cs} | 4 ++-- .../Indexer/{NzbsRUsProvider.cs => NzbsRUs.cs} | 4 ++-- NzbDrone.Core/Providers/IndexerProvider.cs | 10 +++++----- NzbDrone.Core/Providers/Jobs/RssSyncJob.cs | 4 ++-- NzbDrone.Web/Controllers/SettingsController.cs | 16 ++++++++-------- 11 files changed, 42 insertions(+), 42 deletions(-) rename NzbDrone.Core/Providers/Indexer/{IndexerProviderBase.cs => IndexerBase.cs} (95%) rename NzbDrone.Core/Providers/Indexer/{NewzbinProvider.cs => Newzbin.cs} (85%) rename NzbDrone.Core/Providers/Indexer/{NzbMatrixProvider.cs => NzbMatrix.cs} (82%) rename NzbDrone.Core/Providers/Indexer/{NzbsOrgProvider.cs => NzbsOrg.cs} (79%) rename NzbDrone.Core/Providers/Indexer/{NzbsRUsProvider.cs => NzbsRUs.cs} (81%) diff --git a/NzbDrone.Core.Test/IndexerProviderTest.cs b/NzbDrone.Core.Test/IndexerProviderTest.cs index aa924a42d..f43a5b2b8 100644 --- a/NzbDrone.Core.Test/IndexerProviderTest.cs +++ b/NzbDrone.Core.Test/IndexerProviderTest.cs @@ -40,7 +40,7 @@ namespace NzbDrone.Core.Test .Setup(c => c.GetSettings(It.IsAny())) .Returns(fakeSettings); - var parseResults = mocker.Resolve().Fetch(); + var parseResults = mocker.Resolve().Fetch(); Assert.IsNotEmpty(parseResults); @@ -127,7 +127,7 @@ namespace NzbDrone.Core.Test //Act var indexerProvider = mocker.Resolve(); - indexerProvider.InitializeIndexers(new List { mocker.Resolve() }); + indexerProvider.InitializeIndexers(new List { mocker.Resolve() }); var indexers = indexerProvider.All(); //Assert @@ -142,14 +142,14 @@ namespace NzbDrone.Core.Test .Setup(c => c.FindSeries(It.IsAny())) .Returns(null); - var indexer = mocker.Resolve(); + var indexer = mocker.Resolve(); //indexer.ProcessItem(new SyndicationItem { Title = new TextSyndicationContent("Adventure.Inc.S01E18.DVDRip.XviD-OSiTV") }); } } - public class MockIndexerProvider : IndexerProviderBase + public class MockIndexer : IndexerBase { - public MockIndexerProvider(HttpProvider httpProvider, ConfigProvider configProvider, IndexerProvider indexerProvider) + public MockIndexer(HttpProvider httpProvider, ConfigProvider configProvider, IndexerProvider indexerProvider) : base(httpProvider, configProvider, indexerProvider) { } @@ -176,7 +176,7 @@ namespace NzbDrone.Core.Test } } - public class TestUrlIndexer : IndexerProviderBase + public class TestUrlIndexer : IndexerBase { public TestUrlIndexer(HttpProvider httpProvider, ConfigProvider configProvider, IndexerProvider indexerProvider) : base(httpProvider, configProvider, indexerProvider) @@ -199,7 +199,7 @@ namespace NzbDrone.Core.Test } } - public class CustomParserIndexer : IndexerProviderBase + public class CustomParserIndexer : IndexerBase { public CustomParserIndexer(HttpProvider httpProvider, ConfigProvider configProvider, IndexerProvider indexerProvider) : base(httpProvider, configProvider, indexerProvider) diff --git a/NzbDrone.Core/CentralDispatch.cs b/NzbDrone.Core/CentralDispatch.cs index 82aace69e..e7a956578 100644 --- a/NzbDrone.Core/CentralDispatch.cs +++ b/NzbDrone.Core/CentralDispatch.cs @@ -120,11 +120,11 @@ namespace NzbDrone.Core private static void BindIndexers() { - _kernel.Bind().To().InSingletonScope(); - _kernel.Bind().To().InSingletonScope(); - _kernel.Bind().To().InSingletonScope(); - _kernel.Bind().To().InSingletonScope(); - var indexers = _kernel.GetAll(); + _kernel.Bind().To().InSingletonScope(); + _kernel.Bind().To().InSingletonScope(); + _kernel.Bind().To().InSingletonScope(); + _kernel.Bind().To().InSingletonScope(); + var indexers = _kernel.GetAll(); _kernel.Get().InitializeIndexers(indexers.ToList()); } diff --git a/NzbDrone.Core/NzbDrone.Core.csproj b/NzbDrone.Core/NzbDrone.Core.csproj index d88ba4f5a..4403b5977 100644 --- a/NzbDrone.Core/NzbDrone.Core.csproj +++ b/NzbDrone.Core/NzbDrone.Core.csproj @@ -175,13 +175,13 @@ - + - - + + @@ -197,9 +197,9 @@ - + - + diff --git a/NzbDrone.Core/Providers/Indexer/IndexerProviderBase.cs b/NzbDrone.Core/Providers/Indexer/IndexerBase.cs similarity index 95% rename from NzbDrone.Core/Providers/Indexer/IndexerProviderBase.cs rename to NzbDrone.Core/Providers/Indexer/IndexerBase.cs index 6cd4d16a1..fa9bf7b2d 100644 --- a/NzbDrone.Core/Providers/Indexer/IndexerProviderBase.cs +++ b/NzbDrone.Core/Providers/Indexer/IndexerBase.cs @@ -9,14 +9,14 @@ using NzbDrone.Core.Repository; namespace NzbDrone.Core.Providers.Indexer { - public abstract class IndexerProviderBase + public abstract class IndexerBase { protected readonly Logger _logger; private readonly HttpProvider _httpProvider; protected readonly ConfigProvider _configProvider; private readonly IndexerProvider _indexerProvider; - protected IndexerProviderBase(HttpProvider httpProvider, ConfigProvider configProvider, IndexerProvider indexerProvider) + protected IndexerBase(HttpProvider httpProvider, ConfigProvider configProvider, IndexerProvider indexerProvider) { _httpProvider = httpProvider; _configProvider = configProvider; diff --git a/NzbDrone.Core/Providers/Indexer/NewzbinProvider.cs b/NzbDrone.Core/Providers/Indexer/Newzbin.cs similarity index 85% rename from NzbDrone.Core/Providers/Indexer/NewzbinProvider.cs rename to NzbDrone.Core/Providers/Indexer/Newzbin.cs index e35749d0d..9e98f3f5c 100644 --- a/NzbDrone.Core/Providers/Indexer/NewzbinProvider.cs +++ b/NzbDrone.Core/Providers/Indexer/Newzbin.cs @@ -7,9 +7,9 @@ using NzbDrone.Core.Providers.ExternalNotification; namespace NzbDrone.Core.Providers.Indexer { - public class NewzbinProvider : IndexerProviderBase + public class Newzbin : IndexerBase { - public NewzbinProvider(HttpProvider httpProvider, ConfigProvider configProvider, IndexerProvider indexerProvider) : base(httpProvider, configProvider, indexerProvider) + public Newzbin(HttpProvider httpProvider, ConfigProvider configProvider, IndexerProvider indexerProvider) : base(httpProvider, configProvider, indexerProvider) { } diff --git a/NzbDrone.Core/Providers/Indexer/NzbMatrixProvider.cs b/NzbDrone.Core/Providers/Indexer/NzbMatrix.cs similarity index 82% rename from NzbDrone.Core/Providers/Indexer/NzbMatrixProvider.cs rename to NzbDrone.Core/Providers/Indexer/NzbMatrix.cs index cdcb34ad3..fca68090c 100644 --- a/NzbDrone.Core/Providers/Indexer/NzbMatrixProvider.cs +++ b/NzbDrone.Core/Providers/Indexer/NzbMatrix.cs @@ -9,9 +9,9 @@ using SubSonic.Repository; namespace NzbDrone.Core.Providers.Indexer { - public class NzbMatrixProvider : IndexerProviderBase + public class NzbMatrix : IndexerBase { - public NzbMatrixProvider(HttpProvider httpProvider, ConfigProvider configProvider, IndexerProvider indexerProvider) : base(httpProvider, configProvider, indexerProvider) + public NzbMatrix(HttpProvider httpProvider, ConfigProvider configProvider, IndexerProvider indexerProvider) : base(httpProvider, configProvider, indexerProvider) { } diff --git a/NzbDrone.Core/Providers/Indexer/NzbsOrgProvider.cs b/NzbDrone.Core/Providers/Indexer/NzbsOrg.cs similarity index 79% rename from NzbDrone.Core/Providers/Indexer/NzbsOrgProvider.cs rename to NzbDrone.Core/Providers/Indexer/NzbsOrg.cs index 44e76fdc6..2b70a50d8 100644 --- a/NzbDrone.Core/Providers/Indexer/NzbsOrgProvider.cs +++ b/NzbDrone.Core/Providers/Indexer/NzbsOrg.cs @@ -8,9 +8,9 @@ using SubSonic.Repository; namespace NzbDrone.Core.Providers.Indexer { - public class NzbsOrgProvider : IndexerProviderBase + public class NzbsOrg : IndexerBase { - public NzbsOrgProvider(HttpProvider httpProvider, ConfigProvider configProvider, IndexerProvider indexerProvider) : base(httpProvider, configProvider, indexerProvider) + public NzbsOrg(HttpProvider httpProvider, ConfigProvider configProvider, IndexerProvider indexerProvider) : base(httpProvider, configProvider, indexerProvider) { } diff --git a/NzbDrone.Core/Providers/Indexer/NzbsRUsProvider.cs b/NzbDrone.Core/Providers/Indexer/NzbsRUs.cs similarity index 81% rename from NzbDrone.Core/Providers/Indexer/NzbsRUsProvider.cs rename to NzbDrone.Core/Providers/Indexer/NzbsRUs.cs index dd296575c..766490b6e 100644 --- a/NzbDrone.Core/Providers/Indexer/NzbsRUsProvider.cs +++ b/NzbDrone.Core/Providers/Indexer/NzbsRUs.cs @@ -8,9 +8,9 @@ using SubSonic.Repository; namespace NzbDrone.Core.Providers.Indexer { - public class NzbsRUsProvider : IndexerProviderBase + public class NzbsRUs : IndexerBase { - public NzbsRUsProvider(HttpProvider httpProvider, ConfigProvider configProvider, IndexerProvider indexerProvider) : base(httpProvider, configProvider, indexerProvider) + public NzbsRUs(HttpProvider httpProvider, ConfigProvider configProvider, IndexerProvider indexerProvider) : base(httpProvider, configProvider, indexerProvider) { } diff --git a/NzbDrone.Core/Providers/IndexerProvider.cs b/NzbDrone.Core/Providers/IndexerProvider.cs index a5c085ae2..0cac8eeef 100644 --- a/NzbDrone.Core/Providers/IndexerProvider.cs +++ b/NzbDrone.Core/Providers/IndexerProvider.cs @@ -53,7 +53,7 @@ namespace NzbDrone.Core.Providers return _repository.Single(s => s.Id == id); } - public virtual void InitializeIndexers(IList indexers) + public virtual void InitializeIndexers(IList indexers) { Logger.Info("Initializing indexers. Count {0}", indexers.Count); @@ -61,14 +61,14 @@ namespace NzbDrone.Core.Providers foreach (var feedProvider in indexers) { - IndexerProviderBase indexerProviderLocal = feedProvider; - if (!currentIndexers.Exists(c => c.IndexProviderType == indexerProviderLocal.GetType().ToString())) + IndexerBase indexerLocal = feedProvider; + if (!currentIndexers.Exists(c => c.IndexProviderType == indexerLocal.GetType().ToString())) { var settings = new IndexerSetting() { Enable = false, - IndexProviderType = indexerProviderLocal.GetType().ToString(), - Name = indexerProviderLocal.Name + IndexProviderType = indexerLocal.GetType().ToString(), + Name = indexerLocal.Name }; SaveSettings(settings); diff --git a/NzbDrone.Core/Providers/Jobs/RssSyncJob.cs b/NzbDrone.Core/Providers/Jobs/RssSyncJob.cs index 5b5e61e03..f34133134 100644 --- a/NzbDrone.Core/Providers/Jobs/RssSyncJob.cs +++ b/NzbDrone.Core/Providers/Jobs/RssSyncJob.cs @@ -8,12 +8,12 @@ namespace NzbDrone.Core.Providers.Jobs { public class RssSyncJob : IJob { - private readonly IEnumerable _indexers; + private readonly IEnumerable _indexers; private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); - public RssSyncJob(IEnumerable indexers) + public RssSyncJob(IEnumerable indexers) { _indexers = indexers; } diff --git a/NzbDrone.Web/Controllers/SettingsController.cs b/NzbDrone.Web/Controllers/SettingsController.cs index 26a627e89..50257c750 100644 --- a/NzbDrone.Web/Controllers/SettingsController.cs +++ b/NzbDrone.Web/Controllers/SettingsController.cs @@ -93,10 +93,10 @@ namespace NzbDrone.Web.Controllers NewzbinUsername = _configProvider.NewzbinUsername, NewzbinPassword = _configProvider.NewzbinPassword, - NzbsOrgEnabled = _indexerProvider.GetSettings(typeof(NzbsOrgProvider)).Enable, - NzbMatrixEnabled = _indexerProvider.GetSettings(typeof(NzbMatrixProvider)).Enable, - NzbsRUsEnabled = _indexerProvider.GetSettings(typeof(NzbsRUsProvider)).Enable, - NewzbinEnabled = _indexerProvider.GetSettings(typeof(NewzbinProvider)).Enable + NzbsOrgEnabled = _indexerProvider.GetSettings(typeof(NzbsOrg)).Enable, + NzbMatrixEnabled = _indexerProvider.GetSettings(typeof(NzbMatrix)).Enable, + NzbsRUsEnabled = _indexerProvider.GetSettings(typeof(NzbsRUs)).Enable, + NewzbinEnabled = _indexerProvider.GetSettings(typeof(Newzbin)).Enable }); } @@ -382,19 +382,19 @@ namespace NzbDrone.Web.Controllers if (ModelState.IsValid) { - var nzbsOrgSettings = _indexerProvider.GetSettings(typeof(NzbsOrgProvider)); + var nzbsOrgSettings = _indexerProvider.GetSettings(typeof(NzbsOrg)); nzbsOrgSettings.Enable = data.NzbsOrgEnabled; _indexerProvider.SaveSettings(nzbsOrgSettings); - var nzbMatrixSettings = _indexerProvider.GetSettings(typeof(NzbMatrixProvider)); + var nzbMatrixSettings = _indexerProvider.GetSettings(typeof(NzbMatrix)); nzbMatrixSettings.Enable = data.NzbMatrixEnabled; _indexerProvider.SaveSettings(nzbMatrixSettings); - var nzbsRUsSettings = _indexerProvider.GetSettings(typeof(NzbsRUsProvider)); + var nzbsRUsSettings = _indexerProvider.GetSettings(typeof(NzbsRUs)); nzbsRUsSettings.Enable = data.NzbsRUsEnabled; _indexerProvider.SaveSettings(nzbsRUsSettings); - var newzbinSettings = _indexerProvider.GetSettings(typeof(NewzbinProvider)); + var newzbinSettings = _indexerProvider.GetSettings(typeof(Newzbin)); newzbinSettings.Enable = data.NewzbinEnabled; _indexerProvider.SaveSettings(newzbinSettings);