mirror of https://github.com/Radarr/Radarr
Added advanced torznab option to disable rageid lookups for trackers only supporting title queries.
This commit is contained in:
parent
7c246abc88
commit
e5278a0243
|
@ -33,7 +33,7 @@ namespace NzbDrone.Core.Indexers.Torznab
|
||||||
{
|
{
|
||||||
var pageableRequests = new List<IEnumerable<IndexerRequest>>();
|
var pageableRequests = new List<IEnumerable<IndexerRequest>>();
|
||||||
|
|
||||||
if (searchCriteria.Series.TvRageId > 0)
|
if (searchCriteria.Series.TvRageId > 0 && Settings.EnableRageIDLookup)
|
||||||
{
|
{
|
||||||
pageableRequests.AddIfNotNull(GetPagedRequests(MaxPages, Settings.Categories, "tvsearch",
|
pageableRequests.AddIfNotNull(GetPagedRequests(MaxPages, Settings.Categories, "tvsearch",
|
||||||
String.Format("&rid={0}&season={1}&ep={2}",
|
String.Format("&rid={0}&season={1}&ep={2}",
|
||||||
|
@ -60,7 +60,7 @@ namespace NzbDrone.Core.Indexers.Torznab
|
||||||
{
|
{
|
||||||
var pageableRequests = new List<IEnumerable<IndexerRequest>>();
|
var pageableRequests = new List<IEnumerable<IndexerRequest>>();
|
||||||
|
|
||||||
if (searchCriteria.Series.TvRageId > 0)
|
if (searchCriteria.Series.TvRageId > 0 && Settings.EnableRageIDLookup)
|
||||||
{
|
{
|
||||||
pageableRequests.AddIfNotNull(GetPagedRequests(MaxPages, Settings.Categories, "tvsearch",
|
pageableRequests.AddIfNotNull(GetPagedRequests(MaxPages, Settings.Categories, "tvsearch",
|
||||||
String.Format("&rid={0}&season={1}",
|
String.Format("&rid={0}&season={1}",
|
||||||
|
@ -85,7 +85,7 @@ namespace NzbDrone.Core.Indexers.Torznab
|
||||||
{
|
{
|
||||||
var pageableRequests = new List<IEnumerable<IndexerRequest>>();
|
var pageableRequests = new List<IEnumerable<IndexerRequest>>();
|
||||||
|
|
||||||
if (searchCriteria.Series.TvRageId > 0)
|
if (searchCriteria.Series.TvRageId > 0 && Settings.EnableRageIDLookup)
|
||||||
{
|
{
|
||||||
pageableRequests.AddIfNotNull(GetPagedRequests(MaxPages, Settings.Categories, "tvsearch",
|
pageableRequests.AddIfNotNull(GetPagedRequests(MaxPages, Settings.Categories, "tvsearch",
|
||||||
String.Format("&rid={0}&season={1:yyyy}&ep={1:MM}/{1:dd}",
|
String.Format("&rid={0}&season={1:yyyy}&ep={1:MM}/{1:dd}",
|
||||||
|
|
|
@ -49,23 +49,27 @@ namespace NzbDrone.Core.Indexers.Torznab
|
||||||
public TorznabSettings()
|
public TorznabSettings()
|
||||||
{
|
{
|
||||||
Categories = new[] { 5030, 5040 };
|
Categories = new[] { 5030, 5040 };
|
||||||
AnimeCategories = Enumerable.Empty<Int32>();
|
AnimeCategories = Enumerable.Empty<int>();
|
||||||
|
EnableRageIDLookup = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
[FieldDefinition(0, Label = "URL")]
|
[FieldDefinition(0, Label = "URL")]
|
||||||
public String Url { get; set; }
|
public string Url { get; set; }
|
||||||
|
|
||||||
[FieldDefinition(1, Label = "API Key")]
|
[FieldDefinition(1, Label = "API Key")]
|
||||||
public String ApiKey { get; set; }
|
public string ApiKey { get; set; }
|
||||||
|
|
||||||
[FieldDefinition(2, Label = "Categories", HelpText = "Comma Separated list, leave blank to disable standard/daily shows", Advanced = true)]
|
[FieldDefinition(2, Label = "Categories", HelpText = "Comma Separated list, leave blank to disable standard/daily shows", Advanced = true)]
|
||||||
public IEnumerable<Int32> Categories { get; set; }
|
public IEnumerable<int> Categories { get; set; }
|
||||||
|
|
||||||
[FieldDefinition(3, Label = "Anime Categories", HelpText = "Comma Separated list, leave blank to disable anime", Advanced = true)]
|
[FieldDefinition(3, Label = "Anime Categories", HelpText = "Comma Separated list, leave blank to disable anime", Advanced = true)]
|
||||||
public IEnumerable<Int32> AnimeCategories { get; set; }
|
public IEnumerable<int> AnimeCategories { get; set; }
|
||||||
|
|
||||||
[FieldDefinition(4, Label = "Additional Parameters", HelpText = "Additional Torznab parameters", Advanced = true)]
|
[FieldDefinition(4, Label = "Additional Parameters", HelpText = "Additional Torznab parameters", Advanced = true)]
|
||||||
public String AdditionalParameters { get; set; }
|
public string AdditionalParameters { get; set; }
|
||||||
|
|
||||||
|
[FieldDefinition(5, Label = "Enable RageID Lookup", HelpText = "Disable this if your tracker doesn't have tvrage ids, Sonarr will then use (more expensive) title queries.", Advanced = true)]
|
||||||
|
public bool EnableRageIDLookup { get; set; }
|
||||||
|
|
||||||
public NzbDroneValidationResult Validate()
|
public NzbDroneValidationResult Validate()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue