Private GIT

Skip to content
Snippets Groups Projects
Commit 71c583d3 authored by Azerelat's avatar Azerelat
Browse files

AnimeBytes Fix stripping of episode number from search term

parent 9d4e8f4b
No related branches found
No related tags found
No related merge requests found
......@@ -119,12 +119,18 @@ namespace Jackett.Indexers
base.LoadFromSavedConfiguration(jsonConfig);
}
private string StripEpisodeNumber(string term)
{
// Tracer does not support searching with episode number so strip it if we have one
return Regex.Replace(term, @"\W(\dx)?\d?\d$", string.Empty);
}
public async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
{
// The result list
var releases = new List<ReleaseInfo>();
foreach (var result in await GetResults(query.SanitizedSearchTerm))
foreach (var result in await GetResults(StripEpisodeNumber(query.SanitizedSearchTerm)))
{
releases.Add(result);
}
......@@ -136,14 +142,6 @@ namespace Jackett.Indexers
{
var cleanSearchTerm = HttpUtility.UrlEncode(searchTerm);
// This tracker only deals with full seasons so chop off the episode/season number if we have it D:
if (!string.IsNullOrWhiteSpace(searchTerm))
{
var splitindex = searchTerm.LastIndexOf(' ');
if (splitindex > -1)
searchTerm = searchTerm.Substring(0, splitindex);
}
// The result list
var releases = new List<ReleaseInfo>();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment