diff --git a/src/NzbDrone.Core.Test/IndexerTests/NewznabTests/NewznabRequestGeneratorFixture.cs b/src/NzbDrone.Core.Test/IndexerTests/NewznabTests/NewznabRequestGeneratorFixture.cs index 49e26fe55..2211bd24e 100644 --- a/src/NzbDrone.Core.Test/IndexerTests/NewznabTests/NewznabRequestGeneratorFixture.cs +++ b/src/NzbDrone.Core.Test/IndexerTests/NewznabTests/NewznabRequestGeneratorFixture.cs @@ -1,4 +1,4 @@ -using System.Linq; +using System.Linq; using FluentAssertions; using Moq; using NUnit.Framework; @@ -20,7 +20,6 @@ namespace NzbDrone.Core.Test.IndexerTests.NewznabTests { BaseUrl = "http://127.0.0.1:1234/", Categories = new[] { 1, 2 }, - AnimeCategories = new[] { 3, 4 }, ApiKey = "abcd", }; @@ -45,13 +44,13 @@ namespace NzbDrone.Core.Test.IndexerTests.NewznabTests var page = results.GetAllTiers().First().First(); - page.Url.Query.Should().Contain("&cat=1,2,3,4&"); + page.Url.Query.Should().Contain("&cat=1,2&"); } [Test] public void should_not_have_duplicate_categories() { - Subject.Settings.Categories = new[] { 1, 2, 3 }; + Subject.Settings.Categories = new[] { 1, 2, 2, 3 }; var results = Subject.GetRecentRequests(); @@ -59,7 +58,7 @@ namespace NzbDrone.Core.Test.IndexerTests.NewznabTests var page = results.GetAllTiers().First().First(); - page.Url.FullUri.Should().Contain("&cat=1,2,3,4&"); + page.Url.FullUri.Should().Contain("&cat=1,2,3&"); } [Test] diff --git a/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs b/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs index 4161dbb82..d5b31f169 100644 --- a/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs @@ -42,11 +42,11 @@ namespace NzbDrone.Core.Indexers.Newznab // Some indexers might forget to enable movie search, but normal search still works fine. Thus we force a normal search. if (capabilities.SupportedMovieSearchParameters != null) { - pageableRequests.Add(GetPagedRequests(MaxPages, Settings.Categories.Concat(Settings.AnimeCategories), "movie", "")); + pageableRequests.Add(GetPagedRequests(MaxPages, Settings.Categories, "movie", "")); } else if (capabilities.SupportedSearchParameters != null) { - pageableRequests.Add(GetPagedRequests(MaxPages, Settings.Categories.Concat(Settings.AnimeCategories), "search", "")); + pageableRequests.Add(GetPagedRequests(MaxPages, Settings.Categories, "search", "")); } return pageableRequests; diff --git a/src/NzbDrone.Core/Indexers/Newznab/NewznabSettings.cs b/src/NzbDrone.Core/Indexers/Newznab/NewznabSettings.cs index 26c925db1..5dc327147 100644 --- a/src/NzbDrone.Core/Indexers/Newznab/NewznabSettings.cs +++ b/src/NzbDrone.Core/Indexers/Newznab/NewznabSettings.cs @@ -38,9 +38,9 @@ namespace NzbDrone.Core.Indexers.Newznab { RuleFor(c => c).Custom((c, context) => { - if (c.Categories.Empty() && c.AnimeCategories.Empty()) + if (c.Categories.Empty()) { - context.AddFailure("Either 'Categories' or 'Anime Categories' must be provided"); + context.AddFailure("'Categories' must be provided"); } }); @@ -60,7 +60,6 @@ namespace NzbDrone.Core.Indexers.Newznab { ApiPath = "/api"; Categories = new[] { 2000, 2010, 2020, 2030, 2035, 2040, 2045, 2050, 2060 }; - AnimeCategories = new List(); MultiLanguages = new List(); } @@ -79,9 +78,6 @@ namespace NzbDrone.Core.Indexers.Newznab [FieldDefinition(3, Label = "Categories", HelpText = "Comma Separated list, leave blank to disable all categories", Advanced = true)] public IEnumerable Categories { get; set; } - [FieldDefinition(4, Label = "Anime Categories", HelpText = "Comma Separated list, leave blank to disable anime", Advanced = true)] - public IEnumerable AnimeCategories { get; set; } - [FieldDefinition(5, Label = "Additional Parameters", HelpText = "Additional Newznab parameters", Advanced = true)] public string AdditionalParameters { get; set; } diff --git a/src/NzbDrone.Core/Indexers/Torznab/TorznabSettings.cs b/src/NzbDrone.Core/Indexers/Torznab/TorznabSettings.cs index cbef1526a..2fd55cd2e 100644 --- a/src/NzbDrone.Core/Indexers/Torznab/TorznabSettings.cs +++ b/src/NzbDrone.Core/Indexers/Torznab/TorznabSettings.cs @@ -33,9 +33,9 @@ namespace NzbDrone.Core.Indexers.Torznab { RuleFor(c => c).Custom((c, context) => { - if (c.Categories.Empty() && c.AnimeCategories.Empty()) + if (c.Categories.Empty()) { - context.AddFailure("Either 'Categories' or 'Anime Categories' must be provided"); + context.AddFailure("'Categories' must be provided"); } });