mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
BJShare: improve search
This commit is contained in:
@@ -26,8 +26,9 @@ namespace Jackett.Common.Indexers
|
|||||||
private readonly char[] _digits = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
|
private readonly char[] _digits = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
|
||||||
private readonly Dictionary<string, string> _commonSearchTerms = new Dictionary<string, string>
|
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[] {
|
public override string[] LegacySiteLinks { get; protected set; } = new string[] {
|
||||||
"https://bj-share.me/"
|
"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
|
// 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
|
// 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)
|
private static string FixAbsoluteNumbering(string title)
|
||||||
@@ -126,8 +128,13 @@ namespace Jackett.Common.Indexers
|
|||||||
|
|
||||||
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
|
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
|
||||||
{
|
{
|
||||||
|
query = query.Clone(); // avoid modifing the original query
|
||||||
|
|
||||||
|
|
||||||
var releases = new List<ReleaseInfo>();
|
var releases = new List<ReleaseInfo>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// if the search string is empty use the "last 24h torrents" view
|
// if the search string is empty use the "last 24h torrents" view
|
||||||
if (string.IsNullOrWhiteSpace(query.SearchTerm) && !query.IsImdbQuery)
|
if (string.IsNullOrWhiteSpace(query.SearchTerm) && !query.IsImdbQuery)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user