diff --git a/src/NzbDrone.Core/Indexers/Torznab/TorznabRequestGenerator.cs b/src/NzbDrone.Core/Indexers/Torznab/TorznabRequestGenerator.cs index b506b26ac..0eb075efa 100644 --- a/src/NzbDrone.Core/Indexers/Torznab/TorznabRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/Torznab/TorznabRequestGenerator.cs @@ -33,7 +33,7 @@ namespace NzbDrone.Core.Indexers.Torznab { var pageableRequests = new List>(); - if (searchCriteria.Series.TvRageId > 0) + if (searchCriteria.Series.TvRageId > 0 && Settings.EnableRageIDLookup) { pageableRequests.AddIfNotNull(GetPagedRequests(MaxPages, Settings.Categories, "tvsearch", String.Format("&rid={0}&season={1}&ep={2}", @@ -60,7 +60,7 @@ namespace NzbDrone.Core.Indexers.Torznab { var pageableRequests = new List>(); - if (searchCriteria.Series.TvRageId > 0) + if (searchCriteria.Series.TvRageId > 0 && Settings.EnableRageIDLookup) { pageableRequests.AddIfNotNull(GetPagedRequests(MaxPages, Settings.Categories, "tvsearch", String.Format("&rid={0}&season={1}", @@ -85,7 +85,7 @@ namespace NzbDrone.Core.Indexers.Torznab { var pageableRequests = new List>(); - if (searchCriteria.Series.TvRageId > 0) + if (searchCriteria.Series.TvRageId > 0 && Settings.EnableRageIDLookup) { pageableRequests.AddIfNotNull(GetPagedRequests(MaxPages, Settings.Categories, "tvsearch", String.Format("&rid={0}&season={1:yyyy}&ep={1:MM}/{1:dd}", diff --git a/src/NzbDrone.Core/Indexers/Torznab/TorznabSettings.cs b/src/NzbDrone.Core/Indexers/Torznab/TorznabSettings.cs index e0edd9d71..c7a803dc5 100644 --- a/src/NzbDrone.Core/Indexers/Torznab/TorznabSettings.cs +++ b/src/NzbDrone.Core/Indexers/Torznab/TorznabSettings.cs @@ -49,23 +49,27 @@ namespace NzbDrone.Core.Indexers.Torznab public TorznabSettings() { Categories = new[] { 5030, 5040 }; - AnimeCategories = Enumerable.Empty(); + AnimeCategories = Enumerable.Empty(); + EnableRageIDLookup = true; } [FieldDefinition(0, Label = "URL")] - public String Url { get; set; } + public string Url { get; set; } [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)] - public IEnumerable Categories { get; set; } + public IEnumerable Categories { get; set; } [FieldDefinition(3, Label = "Anime Categories", HelpText = "Comma Separated list, leave blank to disable anime", Advanced = true)] - public IEnumerable AnimeCategories { get; set; } + public IEnumerable AnimeCategories { get; set; } [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() {