mirror of https://github.com/Jackett/Jackett
BJShare: improve search
This commit is contained in:
parent
6735ad030d
commit
64ac67f58b
|
@ -26,8 +26,9 @@ namespace Jackett.Common.Indexers
|
|||
private readonly char[] _digits = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
|
||||
private readonly Dictionary<string, string> _commonSearchTerms = new Dictionary<string, string>
|
||||
{
|
||||
{ "agents of shield", "Agents of S.H.I.E.L.D."}
|
||||
};
|
||||
{ "agents of shield", "Agents of S.H.I.E.L.D."},
|
||||
{ "greys anatomy", "grey's anatomy"},
|
||||
};
|
||||
|
||||
public override string[] LegacySiteLinks { get; protected set; } = new string[] {
|
||||
"https://bj-share.me/"
|
||||
|
@ -104,7 +105,8 @@ namespace Jackett.Common.Indexers
|
|||
{
|
||||
// Search does not support searching with episode numbers so strip it if we have one
|
||||
// Ww AND filter the result later to archive the proper result
|
||||
return isAnime ? term.TrimEnd(_digits) : Regex.Replace(term, @"[S|E]\d\d", string.Empty).Trim();
|
||||
term = Regex.Replace(term, @"[S|E]\d\d", string.Empty).Trim();
|
||||
return isAnime ? term.TrimEnd(_digits) : term;
|
||||
}
|
||||
|
||||
private static string FixAbsoluteNumbering(string title)
|
||||
|
@ -126,8 +128,13 @@ namespace Jackett.Common.Indexers
|
|||
|
||||
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
|
||||
{
|
||||
query = query.Clone(); // avoid modifing the original query
|
||||
|
||||
|
||||
var releases = new List<ReleaseInfo>();
|
||||
|
||||
|
||||
|
||||
// if the search string is empty use the "last 24h torrents" view
|
||||
if (string.IsNullOrWhiteSpace(query.SearchTerm) && !query.IsImdbQuery)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue