1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2025-01-01 12:46:23 +00:00

avistaz, privatehd, cinemaz: Remove string sanitising from search query (#7175) resolves #7167

This commit is contained in:
Cory 2020-02-09 23:29:39 -06:00 committed by GitHub
parent c0d7a85db3
commit 9efe27ca7a
2 changed files with 15 additions and 27 deletions

View file

@ -17,20 +17,17 @@ namespace Jackett.Common.Indexers.Abstract
{ {
public abstract class AvistazTracker : BaseWebIndexer public abstract class AvistazTracker : BaseWebIndexer
{ {
private string LoginUrl { get { return SiteLink + "auth/login"; } } private string LoginUrl => SiteLink + "auth/login";
private string SearchUrl { get { return SiteLink + "torrents?in=1&type={0}&search={1}"; } } private string SearchUrl => SiteLink + "torrents?in=1&type={0}&search={1}";
new ConfigurationDataBasicLogin configData private new ConfigurationDataBasicLogin configData
{ {
get { return (ConfigurationDataBasicLogin)base.configData; } get => (ConfigurationDataBasicLogin)base.configData;
set { base.configData = value; } set => base.configData = value;
} }
// hook to adjust the search term // hook to adjust the search term
protected virtual string GetSearchTerm(TorznabQuery query) protected string GetSearchTerm(TorznabQuery query) => $"{query.SearchTerm} {query.GetEpisodeSearchString()}";
{
return query.GetQueryString();
}
public AvistazTracker(IIndexerConfigurationService configService, Utils.Clients.WebClient webClient, Logger logger, IProtectionService protectionService, string name, string desc, string link) public AvistazTracker(IIndexerConfigurationService configService, Utils.Clients.WebClient webClient, Logger logger, IProtectionService protectionService, string name, string desc, string link)
: base(name: name, : base(name: name,
@ -83,7 +80,7 @@ namespace Jackett.Common.Indexers.Abstract
var releases = new List<ReleaseInfo>(); var releases = new List<ReleaseInfo>();
var categoryMapping = MapTorznabCapsToTrackers(query).Distinct(); var categoryMapping = MapTorznabCapsToTrackers(query).Distinct();
string category = "0"; // Aka all var category = "0"; // Aka all
if (categoryMapping.Count() == 1) if (categoryMapping.Count() == 1)
{ {
category = categoryMapping.First(); category = categoryMapping.First();
@ -106,11 +103,12 @@ namespace Jackett.Common.Indexers.Abstract
var rows = dom["table:has(thead) > tbody > tr"]; var rows = dom["table:has(thead) > tbody > tr"];
foreach (var row in rows) foreach (var row in rows)
{ {
CQ qRow = row.Cq(); var qRow = row.Cq();
var release = new ReleaseInfo(); var release = new ReleaseInfo
{
release.MinimumRatio = 1; MinimumRatio = 1,
release.MinimumSeedTime = 172800; // 48 hours MinimumSeedTime = 172800 // 48 hours
};
var qLink = qRow.Find("a.torrent-filename"); var qLink = qRow.Find("a.torrent-filename");
; ;

View file

@ -1,5 +1,4 @@
using Jackett.Common.Indexers.Abstract; using Jackett.Common.Indexers.Abstract;
using Jackett.Common.Models;
using Jackett.Common.Services.Interfaces; using Jackett.Common.Services.Interfaces;
using Jackett.Common.Utils.Clients; using Jackett.Common.Utils.Clients;
using NLog; using NLog;
@ -15,16 +14,7 @@ namespace Jackett.Common.Indexers
configService: configService, configService: configService,
logger: logger, logger: logger,
protectionService: protectionService, protectionService: protectionService,
webClient: webClient webClient: webClient)
) => Type = "private";
{
Type = "private";
}
// hook to adjust the search term
protected override string GetSearchTerm(TorznabQuery query)
{
return query.SanitizedSearchTerm;
}
} }
} }