mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-12 11:15:43 +02:00
Specify in the logs what indexer is lacking capabilities
This commit is contained in:
parent
322836e2b3
commit
51dc96cb6e
@ -3,6 +3,7 @@
|
||||
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 @@ public class NewznabRequestGeneratorFixture : CoreTest<NewznabRequestGenerator>
|
||||
[SetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
Subject.Definition = new IndexerDefinition
|
||||
{
|
||||
Name = "Newznab"
|
||||
};
|
||||
|
||||
Subject.Settings = new NewznabSettings()
|
||||
{
|
||||
BaseUrl = "http://127.0.0.1:1234/",
|
||||
|
@ -31,6 +31,7 @@ public override IIndexerRequestGenerator GetRequestGenerator()
|
||||
{
|
||||
return new NewznabRequestGenerator(_capabilitiesProvider)
|
||||
{
|
||||
Definition = Definition,
|
||||
PageSize = PageSize,
|
||||
Settings = Settings
|
||||
};
|
||||
|
@ -7,6 +7,7 @@
|
||||
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 @@ public class NewznabRequestGenerator : IIndexerRequestGenerator
|
||||
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 @@ public virtual IndexerPageableRequestChain GetSearchRequests(SingleEpisodeSearch
|
||||
|
||||
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 @@ public virtual IndexerPageableRequestChain GetSearchRequests(SeasonSearchCriteri
|
||||
|
||||
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 @@ public virtual IndexerPageableRequestChain GetSearchRequests(DailyEpisodeSearchC
|
||||
|
||||
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 @@ public virtual IndexerPageableRequestChain GetSearchRequests(DailySeasonSearchCr
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ public override IIndexerRequestGenerator GetRequestGenerator()
|
||||
{
|
||||
return new NewznabRequestGenerator(_capabilitiesProvider)
|
||||
{
|
||||
Definition = Definition,
|
||||
PageSize = PageSize,
|
||||
Settings = Settings
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user