diff --git a/src/NzbDrone.Core.Test/IndexerTests/NewznabTests/NewznabRequestGeneratorFixture.cs b/src/NzbDrone.Core.Test/IndexerTests/NewznabTests/NewznabRequestGeneratorFixture.cs index 72ee0b3ad..a33ee7562 100644 --- a/src/NzbDrone.Core.Test/IndexerTests/NewznabTests/NewznabRequestGeneratorFixture.cs +++ b/src/NzbDrone.Core.Test/IndexerTests/NewznabTests/NewznabRequestGeneratorFixture.cs @@ -3,6 +3,7 @@ using System.Linq; using FluentAssertions; using Moq; using NUnit.Framework; +using NzbDrone.Core.Indexers; using NzbDrone.Core.Indexers.Newznab; using NzbDrone.Core.IndexerSearch.Definitions; using NzbDrone.Core.Test.Framework; @@ -19,6 +20,11 @@ namespace NzbDrone.Core.Test.IndexerTests.NewznabTests [SetUp] public void SetUp() { + Subject.Definition = new IndexerDefinition + { + Name = "Newznab" + }; + Subject.Settings = new NewznabSettings() { BaseUrl = "http://127.0.0.1:1234/", diff --git a/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs b/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs index 8e68f7fe1..356cab397 100644 --- a/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs +++ b/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs @@ -31,6 +31,7 @@ namespace NzbDrone.Core.Indexers.Newznab { return new NewznabRequestGenerator(_capabilitiesProvider) { + Definition = Definition, PageSize = PageSize, Settings = Settings }; diff --git a/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs b/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs index 217d1c86b..ef7f0c498 100644 --- a/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs @@ -7,6 +7,7 @@ using NzbDrone.Common.Http; using NzbDrone.Common.Instrumentation; using NzbDrone.Core.DataAugmentation.Scene; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.ThingiProvider; namespace NzbDrone.Core.Indexers.Newznab { @@ -15,6 +16,7 @@ namespace NzbDrone.Core.Indexers.Newznab private readonly Logger _logger; private readonly INewznabCapabilitiesProvider _capabilitiesProvider; + public ProviderDefinition Definition { get; set; } public int MaxPages { get; set; } public int PageSize { get; set; } public NewznabSettings Settings { get; set; } @@ -203,14 +205,14 @@ namespace NzbDrone.Core.Indexers.Newznab if (!SupportsEpisodeSearch) { - _logger.Debug("Indexer capabilities lacking season & ep query parameters, no Standard series search possible."); + _logger.Debug("Indexer capabilities lacking season & ep query parameters, no Standard series search possible: {0}", Definition.Name); return pageableRequests; } if (!SupportsTvTextSearches && !SupportsTvIdSearches) { - _logger.Debug("Indexer capabilities lacking q, title, tvdbid, imdbid, rid and tvmazeid parameters, no Standard series search possible."); + _logger.Debug("Indexer capabilities lacking q, title, tvdbid, imdbid, rid and tvmazeid parameters, no Standard series search possible: {0}", Definition.Name); return pageableRequests; } @@ -250,14 +252,14 @@ namespace NzbDrone.Core.Indexers.Newznab if (!SupportsSeasonSearch) { - _logger.Debug("Indexer capabilities lacking season query parameter, no Standard series search possible."); + _logger.Debug("Indexer capabilities lacking season query parameter, no Standard series search possible: {0}", Definition.Name); return pageableRequests; } if (!SupportsTvTextSearches && !SupportsTvIdSearches) { - _logger.Debug("Indexer capabilities lacking q, title, tvdbid, imdbid, rid and tvmazeid parameters, no Standard series search possible."); + _logger.Debug("Indexer capabilities lacking q, title, tvdbid, imdbid, rid and tvmazeid parameters, no Standard series search possible: {0}", Definition.Name); return pageableRequests; } @@ -297,14 +299,14 @@ namespace NzbDrone.Core.Indexers.Newznab if (!SupportsEpisodeSearch) { - _logger.Debug("Indexer capabilities lacking season & ep query parameters, no Daily series search possible."); + _logger.Debug("Indexer capabilities lacking season & ep query parameters, no Daily series search possible: {0}", Definition.Name); return pageableRequests; } if (!SupportsTvTextSearches && !SupportsTvIdSearches) { - _logger.Debug("Indexer capabilities lacking q, title, tvdbid, imdbid, rid and tvmazeid parameters, no Daily series search possible."); + _logger.Debug("Indexer capabilities lacking q, title, tvdbid, imdbid, rid and tvmazeid parameters, no Daily series search possible: {0}", Definition.Name); return pageableRequests; } @@ -344,14 +346,14 @@ namespace NzbDrone.Core.Indexers.Newznab if (!SupportsEpisodeSearch) { - _logger.Debug("Indexer capabilities lacking season query parameter, no Daily series search possible."); + _logger.Debug("Indexer capabilities lacking season query parameter, no Daily series search possible: {0}", Definition.Name); return pageableRequests; } if (!SupportsTvTextSearches && !SupportsTvIdSearches) { - _logger.Debug("Indexer capabilities lacking q, title, tvdbid, imdbid, rid and tvmazeid parameters, no Daily series search possible."); + _logger.Debug("Indexer capabilities lacking q, title, tvdbid, imdbid, rid and tvmazeid parameters, no Daily series search possible: {0}", Definition.Name); return pageableRequests; } diff --git a/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs b/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs index 2e93e73ba..ab5f85a85 100644 --- a/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs +++ b/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs @@ -32,6 +32,7 @@ namespace NzbDrone.Core.Indexers.Torznab { return new NewznabRequestGenerator(_capabilitiesProvider) { + Definition = Definition, PageSize = PageSize, Settings = Settings };