mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-06 08:34:28 +01: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:
parent
f67c672ec7
commit
770fd64013
7 changed files with 5 additions and 101 deletions
|
|
@ -193,16 +193,9 @@ private CookieContainer InitializeRequestCookies(HttpRequest request)
|
|||
{
|
||||
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 @@ private CookieContainer InitializeRequestCookies(HttpRequest request)
|
|||
|
||||
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 @@ private void HandleResponseCookies(HttpResponse response, CookieContainer contai
|
|||
{
|
||||
lock (_cookieContainerCache)
|
||||
{
|
||||
var persistentCookieContainer = _cookieContainerCache.Get("container", () => new CookieContainer
|
||||
{
|
||||
PerDomainCapacity = 100
|
||||
});
|
||||
var persistentCookieContainer = _cookieContainerCache.Get("container", () => new CookieContainer());
|
||||
|
||||
AddCookiesToContainer(response.Request.Url, cookieHeaders, persistentCookieContainer);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,9 +34,7 @@ public class GazelleGames : TorrentIndexerBase<GazelleGamesSettings>
|
|||
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 @@ private List<KeyValuePair<string, string>> GetBasicSearchParameters(string searc
|
|||
{ "request", "search" },
|
||||
{ "search_type", "torrents" },
|
||||
{ "empty_groups", "filled" },
|
||||
{ "dupable", "0" },
|
||||
{ "order_by", "time" },
|
||||
{ "order_way", "desc" }
|
||||
};
|
||||
|
|
@ -360,12 +357,6 @@ private List<KeyValuePair<string, string>> GetBasicSearchParameters(string searc
|
|||
}
|
||||
}
|
||||
|
||||
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 @@ private static string GetTitle(GazelleGamesGroup group, GazelleGamesTorrent torr
|
|||
flags.Add("Trumpable");
|
||||
}
|
||||
|
||||
if (torrent.IsSnatched)
|
||||
{
|
||||
flags.Add("Snatched");
|
||||
}
|
||||
|
||||
flags = flags.Where(x => x.IsNotNullOrWhiteSpace()).ToList();
|
||||
|
||||
if (flags.Any())
|
||||
|
|
@ -628,7 +614,6 @@ public class GazelleGamesTorrent
|
|||
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; }
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ public class TorrentQuery
|
|||
public IEnumerable<int> Codec { get; set; }
|
||||
public IEnumerable<int> Medium { get; set; }
|
||||
public IEnumerable<int> Origin { get; set; }
|
||||
public IEnumerable<int> Exclusive { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "imdb")]
|
||||
public ImdbInfo ImdbInfo { get; set; }
|
||||
|
|
|
|||
|
|
@ -138,11 +138,6 @@ private IEnumerable<IndexerRequest> GetRequest(TorrentQuery query, SearchCriteri
|
|||
query.Origin = Settings.Origins.ToArray();
|
||||
}
|
||||
|
||||
if (Settings.Exclusive.Any())
|
||||
{
|
||||
query.Exclusive = Settings.Exclusive.ToArray();
|
||||
}
|
||||
|
||||
if (searchCriteria.Categories?.Length > 0)
|
||||
{
|
||||
query.Category = Capabilities.Categories
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ public HDBitsSettings()
|
|||
Origins = Array.Empty<int>();
|
||||
FreeleechOnly = false;
|
||||
UseFilenames = true;
|
||||
Exclusive = Array.Empty<int>();
|
||||
}
|
||||
|
||||
[FieldDefinition(2, Label = "Username", HelpText = "IndexerHDBitsSettingsUsernameHelpText", Privacy = PrivacyLevel.UserName)]
|
||||
|
|
@ -51,9 +50,6 @@ public HDBitsSettings()
|
|||
[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<int> Exclusive { get; set; }
|
||||
|
||||
public override NzbDroneValidationResult Validate()
|
||||
{
|
||||
return new NzbDroneValidationResult(Validator.Validate(this));
|
||||
|
|
@ -95,12 +91,4 @@ public enum HdBitsOrigin
|
|||
[FieldOption("Internal")]
|
||||
Internal = 1
|
||||
}
|
||||
|
||||
public enum HdBitsExclusive
|
||||
{
|
||||
[FieldOption("Non-exclusive")]
|
||||
NonExclusive = 0,
|
||||
[FieldOption("Exclusive")]
|
||||
Exclusive = 1
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ public class PassThePopcornTorrent
|
|||
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; }
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
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 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
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; }
|
||||
|
||||
private string GetDownloadUrl(int torrentId)
|
||||
|
|
|
|||
Loading…
Reference in a new issue