kinozal, rutracker: add keywordsfilters. resolves #13496 (#13498)

This commit is contained in:
ilike2burnthing 2022-08-23 02:06:11 +01:00 committed by GitHub
parent d5ddf063ba
commit bb53da8f83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -152,6 +152,8 @@ search:
keywordsfilters:
# - name: diacritics # 8686
# args: replace
- name: re_replace
args: ["[^a-zA-Zа-яА-Я0-9]+", " "]
- name: re_replace # S01 to 1
args: ["(?i)\\bS0*(\\d+)\\b", "$1"]
- name: re_replace # S01E01 to 1 1

View File

@ -1481,7 +1481,10 @@ namespace Jackett.Common.Indexers
{
var queryCollection = new NameValueCollection();
var searchString = query.SanitizedSearchTerm;
var searchString = query.GetQueryString();
// replace any space, special char, etc. with % (wildcard)
var ReplaceRegex = new Regex("[^a-zA-Zа-яА-Я0-9]+");
searchString = ReplaceRegex.Replace(searchString, "%");
// if the search string is empty use the getnew view
if (string.IsNullOrWhiteSpace(searchString))