AnimeTorrents: improve search

This commit is contained in:
kaso17 2018-03-14 15:42:47 +01:00
parent 24c4a1e002
commit 2120457518
1 changed files with 6 additions and 0 deletions

View File

@ -4,6 +4,7 @@ using System.Collections.Specialized;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using CsQuery;
using Jackett.Common.Models;
@ -91,6 +92,11 @@ namespace Jackett.Common.Indexers
{
var releases = new List<ReleaseInfo>();
var searchString = query.GetQueryString();
// replace any space, special char, etc. with % (wildcard)
Regex ReplaceRegex = new Regex("[^a-zA-Z0-9]+");
searchString = ReplaceRegex.Replace(searchString, "%");
var searchUrl = SearchUrl;
var queryCollection = new NameValueCollection();