mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Revert Various
Revert "Fixed: (HttpClient) Increase cookie limit per domain to 100" This reverts commitf67c672ec7
. Revert "Add exclusive only" This reverts commit80425f5ea4
. Revert "GGn Snatched + Pagination"This reverts commit758cae3f40
. Revert "Fixed: (PassThePopcorn) Generate titles for full discs" This reverts commitfbf4ff6777
.
This commit is contained in:
@@ -193,16 +193,9 @@ namespace NzbDrone.Common.Http
|
|||||||
{
|
{
|
||||||
lock (_cookieContainerCache)
|
lock (_cookieContainerCache)
|
||||||
{
|
{
|
||||||
var sourceContainer = new CookieContainer
|
var sourceContainer = new CookieContainer();
|
||||||
{
|
|
||||||
PerDomainCapacity = 100
|
|
||||||
};
|
|
||||||
|
|
||||||
var presistentContainer = _cookieContainerCache.Get("container", () => new CookieContainer
|
|
||||||
{
|
|
||||||
PerDomainCapacity = 100
|
|
||||||
});
|
|
||||||
|
|
||||||
|
var presistentContainer = _cookieContainerCache.Get("container", () => new CookieContainer());
|
||||||
var persistentCookies = presistentContainer.GetCookies((Uri)request.Url);
|
var persistentCookies = presistentContainer.GetCookies((Uri)request.Url);
|
||||||
sourceContainer.Add(persistentCookies);
|
sourceContainer.Add(persistentCookies);
|
||||||
|
|
||||||
@@ -250,10 +243,7 @@ namespace NzbDrone.Common.Http
|
|||||||
|
|
||||||
private CookieContainer HandleRedirectCookies(HttpRequest request, HttpResponse response)
|
private CookieContainer HandleRedirectCookies(HttpRequest request, HttpResponse response)
|
||||||
{
|
{
|
||||||
var sourceContainer = new CookieContainer
|
var sourceContainer = new CookieContainer();
|
||||||
{
|
|
||||||
PerDomainCapacity = 100
|
|
||||||
};
|
|
||||||
var responseCookies = response.GetCookies();
|
var responseCookies = response.GetCookies();
|
||||||
if (responseCookies.Count != 0)
|
if (responseCookies.Count != 0)
|
||||||
{
|
{
|
||||||
@@ -310,10 +300,7 @@ namespace NzbDrone.Common.Http
|
|||||||
{
|
{
|
||||||
lock (_cookieContainerCache)
|
lock (_cookieContainerCache)
|
||||||
{
|
{
|
||||||
var persistentCookieContainer = _cookieContainerCache.Get("container", () => new CookieContainer
|
var persistentCookieContainer = _cookieContainerCache.Get("container", () => new CookieContainer());
|
||||||
{
|
|
||||||
PerDomainCapacity = 100
|
|
||||||
});
|
|
||||||
|
|
||||||
AddCookiesToContainer(response.Request.Url, cookieHeaders, persistentCookieContainer);
|
AddCookiesToContainer(response.Request.Url, cookieHeaders, persistentCookieContainer);
|
||||||
}
|
}
|
||||||
|
@@ -34,9 +34,7 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||||||
public override string Language => "en-US";
|
public override string Language => "en-US";
|
||||||
public override Encoding Encoding => Encoding.UTF8;
|
public override Encoding Encoding => Encoding.UTF8;
|
||||||
public override IndexerPrivacy Privacy => IndexerPrivacy.Private;
|
public override IndexerPrivacy Privacy => IndexerPrivacy.Private;
|
||||||
public override bool SupportsPagination => true;
|
|
||||||
public override IndexerCapabilities Capabilities => SetCapabilities();
|
public override IndexerCapabilities Capabilities => SetCapabilities();
|
||||||
public override TimeSpan RateLimit => TimeSpan.FromSeconds(3);
|
|
||||||
|
|
||||||
public GazelleGames(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger)
|
public GazelleGames(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger)
|
||||||
: base(httpClient, eventAggregator, indexerStatusService, configService, logger)
|
: base(httpClient, eventAggregator, indexerStatusService, configService, logger)
|
||||||
@@ -314,7 +312,6 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||||||
{ "request", "search" },
|
{ "request", "search" },
|
||||||
{ "search_type", "torrents" },
|
{ "search_type", "torrents" },
|
||||||
{ "empty_groups", "filled" },
|
{ "empty_groups", "filled" },
|
||||||
{ "dupable", "0" },
|
|
||||||
{ "order_by", "time" },
|
{ "order_by", "time" },
|
||||||
{ "order_way", "desc" }
|
{ "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;
|
return parameters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -510,11 +501,6 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||||||
flags.Add("Trumpable");
|
flags.Add("Trumpable");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (torrent.IsSnatched)
|
|
||||||
{
|
|
||||||
flags.Add("Snatched");
|
|
||||||
}
|
|
||||||
|
|
||||||
flags = flags.Where(x => x.IsNotNullOrWhiteSpace()).ToList();
|
flags = flags.Where(x => x.IsNotNullOrWhiteSpace()).ToList();
|
||||||
|
|
||||||
if (flags.Any())
|
if (flags.Any())
|
||||||
@@ -628,7 +614,6 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||||||
public string TorrentType { get; set; }
|
public string TorrentType { get; set; }
|
||||||
public int FileCount { get; set; }
|
public int FileCount { get; set; }
|
||||||
public string Size { get; set; }
|
public string Size { get; set; }
|
||||||
public bool IsSnatched { get; set; }
|
|
||||||
public int? Snatched { get; set; }
|
public int? Snatched { get; set; }
|
||||||
public int Seeders { get; set; }
|
public int Seeders { get; set; }
|
||||||
public int Leechers { get; set; }
|
public int Leechers { get; set; }
|
||||||
|
@@ -18,7 +18,6 @@ namespace NzbDrone.Core.Indexers.Definitions.HDBits
|
|||||||
public IEnumerable<int> Codec { get; set; }
|
public IEnumerable<int> Codec { get; set; }
|
||||||
public IEnumerable<int> Medium { get; set; }
|
public IEnumerable<int> Medium { get; set; }
|
||||||
public IEnumerable<int> Origin { get; set; }
|
public IEnumerable<int> Origin { get; set; }
|
||||||
public IEnumerable<int> Exclusive { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty(PropertyName = "imdb")]
|
[JsonProperty(PropertyName = "imdb")]
|
||||||
public ImdbInfo ImdbInfo { get; set; }
|
public ImdbInfo ImdbInfo { get; set; }
|
||||||
|
@@ -138,11 +138,6 @@ namespace NzbDrone.Core.Indexers.Definitions.HDBits
|
|||||||
query.Origin = Settings.Origins.ToArray();
|
query.Origin = Settings.Origins.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Settings.Exclusive.Any())
|
|
||||||
{
|
|
||||||
query.Exclusive = Settings.Exclusive.ToArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (searchCriteria.Categories?.Length > 0)
|
if (searchCriteria.Categories?.Length > 0)
|
||||||
{
|
{
|
||||||
query.Category = Capabilities.Categories
|
query.Category = Capabilities.Categories
|
||||||
|
@@ -27,7 +27,6 @@ namespace NzbDrone.Core.Indexers.Definitions.HDBits
|
|||||||
Origins = Array.Empty<int>();
|
Origins = Array.Empty<int>();
|
||||||
FreeleechOnly = false;
|
FreeleechOnly = false;
|
||||||
UseFilenames = true;
|
UseFilenames = true;
|
||||||
Exclusive = Array.Empty<int>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[FieldDefinition(2, Label = "Username", HelpText = "IndexerHDBitsSettingsUsernameHelpText", Privacy = PrivacyLevel.UserName)]
|
[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")]
|
[FieldDefinition(8, Label = "IndexerHDBitsSettingsUseFilenames", Type = FieldType.Checkbox, HelpText = "IndexerHDBitsSettingsUseFilenamesHelpText")]
|
||||||
public bool UseFilenames { get; set; }
|
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<int> Exclusive { get; set; }
|
|
||||||
|
|
||||||
public override NzbDroneValidationResult Validate()
|
public override NzbDroneValidationResult Validate()
|
||||||
{
|
{
|
||||||
return new NzbDroneValidationResult(Validator.Validate(this));
|
return new NzbDroneValidationResult(Validator.Validate(this));
|
||||||
@@ -95,12 +91,4 @@ namespace NzbDrone.Core.Indexers.Definitions.HDBits
|
|||||||
[FieldOption("Internal")]
|
[FieldOption("Internal")]
|
||||||
Internal = 1
|
Internal = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum HdBitsExclusive
|
|
||||||
{
|
|
||||||
[FieldOption("Non-exclusive")]
|
|
||||||
NonExclusive = 0,
|
|
||||||
[FieldOption("Exclusive")]
|
|
||||||
Exclusive = 1
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -37,7 +37,6 @@ namespace NzbDrone.Core.Indexers.Definitions.PassThePopcorn
|
|||||||
public string Seeders { get; set; }
|
public string Seeders { get; set; }
|
||||||
public string Leechers { get; set; }
|
public string Leechers { get; set; }
|
||||||
public string ReleaseName { get; set; }
|
public string ReleaseName { get; set; }
|
||||||
public string ReleaseGroup { get; set; }
|
|
||||||
public bool Checked { get; set; }
|
public bool Checked { get; set; }
|
||||||
public bool GoldenPopcorn { get; set; }
|
public bool GoldenPopcorn { get; set; }
|
||||||
public string FreeleechType { get; set; }
|
public string FreeleechType { get; set; }
|
||||||
|
@@ -93,7 +93,7 @@ namespace NzbDrone.Core.Indexers.Definitions.PassThePopcorn
|
|||||||
torrentInfos.Add(new TorrentInfo
|
torrentInfos.Add(new TorrentInfo
|
||||||
{
|
{
|
||||||
Guid = $"PassThePopcorn-{id}",
|
Guid = $"PassThePopcorn-{id}",
|
||||||
Title = GetTitle(torrent, result),
|
Title = title,
|
||||||
Year = int.Parse(result.Year),
|
Year = int.Parse(result.Year),
|
||||||
InfoUrl = GetInfoUrl(result.GroupId, id),
|
InfoUrl = GetInfoUrl(result.GroupId, id),
|
||||||
DownloadUrl = GetDownloadUrl(id),
|
DownloadUrl = GetDownloadUrl(id),
|
||||||
@@ -119,55 +119,6 @@ namespace NzbDrone.Core.Indexers.Definitions.PassThePopcorn
|
|||||||
return torrentInfos;
|
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<string>();
|
|
||||||
|
|
||||||
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<IDictionary<string, string>, DateTime?> CookiesUpdater { get; set; }
|
public Action<IDictionary<string, string>, DateTime?> CookiesUpdater { get; set; }
|
||||||
|
|
||||||
private string GetDownloadUrl(int torrentId)
|
private string GetDownloadUrl(int torrentId)
|
||||||
|
Reference in New Issue
Block a user