diff --git a/src/NzbDrone.Common/Http/HttpClient.cs b/src/NzbDrone.Common/Http/HttpClient.cs index d497b00c4..9fa05a485 100644 --- a/src/NzbDrone.Common/Http/HttpClient.cs +++ b/src/NzbDrone.Common/Http/HttpClient.cs @@ -193,16 +193,9 @@ namespace NzbDrone.Common.Http { lock (_cookieContainerCache) { - var sourceContainer = new CookieContainer - { - PerDomainCapacity = 100 - }; - - var presistentContainer = _cookieContainerCache.Get("container", () => new CookieContainer - { - PerDomainCapacity = 100 - }); + var sourceContainer = new CookieContainer(); + var presistentContainer = _cookieContainerCache.Get("container", () => new CookieContainer()); var persistentCookies = presistentContainer.GetCookies((Uri)request.Url); sourceContainer.Add(persistentCookies); @@ -250,10 +243,7 @@ namespace NzbDrone.Common.Http private CookieContainer HandleRedirectCookies(HttpRequest request, HttpResponse response) { - var sourceContainer = new CookieContainer - { - PerDomainCapacity = 100 - }; + var sourceContainer = new CookieContainer(); var responseCookies = response.GetCookies(); if (responseCookies.Count != 0) { @@ -310,10 +300,7 @@ namespace NzbDrone.Common.Http { lock (_cookieContainerCache) { - var persistentCookieContainer = _cookieContainerCache.Get("container", () => new CookieContainer - { - PerDomainCapacity = 100 - }); + var persistentCookieContainer = _cookieContainerCache.Get("container", () => new CookieContainer()); AddCookiesToContainer(response.Request.Url, cookieHeaders, persistentCookieContainer); } diff --git a/src/NzbDrone.Core/Indexers/Definitions/GazelleGames.cs b/src/NzbDrone.Core/Indexers/Definitions/GazelleGames.cs index a676687da..12327f640 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/GazelleGames.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/GazelleGames.cs @@ -34,9 +34,7 @@ namespace NzbDrone.Core.Indexers.Definitions public override string Language => "en-US"; public override Encoding Encoding => Encoding.UTF8; public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override bool SupportsPagination => true; public override IndexerCapabilities Capabilities => SetCapabilities(); - public override TimeSpan RateLimit => TimeSpan.FromSeconds(3); public GazelleGames(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) : base(httpClient, eventAggregator, indexerStatusService, configService, logger) @@ -314,7 +312,6 @@ namespace NzbDrone.Core.Indexers.Definitions { "request", "search" }, { "search_type", "torrents" }, { "empty_groups", "filled" }, - { "dupable", "0" }, { "order_by", "time" }, { "order_way", "desc" } }; @@ -360,12 +357,6 @@ namespace NzbDrone.Core.Indexers.Definitions } } - if (searchCriteria.Limit is > 0 && searchCriteria.Offset is > 0) - { - var page = (int)(searchCriteria.Offset / searchCriteria.Limit) + 1; - parameters.Add("page", page.ToString()); - } - return parameters; } @@ -510,11 +501,6 @@ namespace NzbDrone.Core.Indexers.Definitions flags.Add("Trumpable"); } - if (torrent.IsSnatched) - { - flags.Add("Snatched"); - } - flags = flags.Where(x => x.IsNotNullOrWhiteSpace()).ToList(); if (flags.Any()) @@ -628,7 +614,6 @@ namespace NzbDrone.Core.Indexers.Definitions public string TorrentType { get; set; } public int FileCount { get; set; } public string Size { get; set; } - public bool IsSnatched { get; set; } public int? Snatched { get; set; } public int Seeders { get; set; } public int Leechers { get; set; } diff --git a/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsApi.cs b/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsApi.cs index f6fa74f33..5f8b947ae 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsApi.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsApi.cs @@ -18,7 +18,6 @@ namespace NzbDrone.Core.Indexers.Definitions.HDBits public IEnumerable Codec { get; set; } public IEnumerable Medium { get; set; } public IEnumerable Origin { get; set; } - public IEnumerable Exclusive { get; set; } [JsonProperty(PropertyName = "imdb")] public ImdbInfo ImdbInfo { get; set; } diff --git a/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsRequestGenerator.cs b/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsRequestGenerator.cs index 42dce7f5a..87e24b1c2 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsRequestGenerator.cs @@ -138,11 +138,6 @@ namespace NzbDrone.Core.Indexers.Definitions.HDBits query.Origin = Settings.Origins.ToArray(); } - if (Settings.Exclusive.Any()) - { - query.Exclusive = Settings.Exclusive.ToArray(); - } - if (searchCriteria.Categories?.Length > 0) { query.Category = Capabilities.Categories diff --git a/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsSettings.cs b/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsSettings.cs index d68985458..9b3d380da 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsSettings.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsSettings.cs @@ -27,7 +27,6 @@ namespace NzbDrone.Core.Indexers.Definitions.HDBits Origins = Array.Empty(); FreeleechOnly = false; UseFilenames = true; - Exclusive = Array.Empty(); } [FieldDefinition(2, Label = "Username", HelpText = "IndexerHDBitsSettingsUsernameHelpText", Privacy = PrivacyLevel.UserName)] @@ -51,9 +50,6 @@ namespace NzbDrone.Core.Indexers.Definitions.HDBits [FieldDefinition(8, Label = "IndexerHDBitsSettingsUseFilenames", Type = FieldType.Checkbox, HelpText = "IndexerHDBitsSettingsUseFilenamesHelpText")] public bool UseFilenames { get; set; } - [FieldDefinition(9, Label = "Exclusivities", Type = FieldType.Select, SelectOptions = typeof(HdBitsExclusive), HelpText = "If unspecified, all options are used.", Advanced = true)] - public IEnumerable Exclusive { get; set; } - public override NzbDroneValidationResult Validate() { return new NzbDroneValidationResult(Validator.Validate(this)); @@ -95,12 +91,4 @@ namespace NzbDrone.Core.Indexers.Definitions.HDBits [FieldOption("Internal")] Internal = 1 } - - public enum HdBitsExclusive - { - [FieldOption("Non-exclusive")] - NonExclusive = 0, - [FieldOption("Exclusive")] - Exclusive = 1 - } } diff --git a/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcornApi.cs b/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcornApi.cs index 0867ad1ba..d126f0d1b 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcornApi.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcornApi.cs @@ -37,7 +37,6 @@ namespace NzbDrone.Core.Indexers.Definitions.PassThePopcorn public string Seeders { get; set; } public string Leechers { get; set; } public string ReleaseName { get; set; } - public string ReleaseGroup { get; set; } public bool Checked { get; set; } public bool GoldenPopcorn { get; set; } public string FreeleechType { get; set; } diff --git a/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcornParser.cs b/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcornParser.cs index e7e2b30c1..fa5791a62 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcornParser.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcornParser.cs @@ -93,7 +93,7 @@ namespace NzbDrone.Core.Indexers.Definitions.PassThePopcorn torrentInfos.Add(new TorrentInfo { Guid = $"PassThePopcorn-{id}", - Title = GetTitle(torrent, result), + Title = title, Year = int.Parse(result.Year), InfoUrl = GetInfoUrl(result.GroupId, id), DownloadUrl = GetDownloadUrl(id), @@ -119,55 +119,6 @@ namespace NzbDrone.Core.Indexers.Definitions.PassThePopcorn return torrentInfos; } - private static string GetTitle(PassThePopcornTorrent torrent, PassThePopcornMovie result) - { - var title = torrent.ReleaseName; - - if (torrent.Container.ToUpperInvariant() is "M2TS" or "ISO" or "VOB IFO" || !torrent.ReleaseName.Contains(result.Year)) - { - title = $"{result.Title} ({result.Year})"; - - var titleTags = new List(); - - if (torrent.Resolution.IsNotNullOrWhiteSpace()) - { - titleTags.Add(torrent.Resolution); - } - - if (torrent.Source.IsNotNullOrWhiteSpace()) - { - titleTags.Add(torrent.Source); - } - - if (torrent.Codec.IsNotNullOrWhiteSpace()) - { - titleTags.Add(torrent.Codec); - } - - if (torrent.Container.IsNotNullOrWhiteSpace()) - { - titleTags.Add(torrent.Container.ToUpperInvariant()); - } - - if (torrent.RemasterTitle.IsNotNullOrWhiteSpace()) - { - titleTags.Add(torrent.RemasterTitle); - } - - if (titleTags.Any()) - { - title += $" {string.Join(" / ", titleTags)}"; - } - - if (torrent.ReleaseGroup.IsNotNullOrWhiteSpace()) - { - title += $" -{torrent.ReleaseGroup}"; - } - } - - return title; - } - public Action, DateTime?> CookiesUpdater { get; set; } private string GetDownloadUrl(int torrentId)