diff --git a/src/Jackett.Common/Indexers/MejorTorrent.cs b/src/Jackett.Common/Indexers/MejorTorrent.cs index d6f5d9b4c..95b14d516 100644 --- a/src/Jackett.Common/Indexers/MejorTorrent.cs +++ b/src/Jackett.Common/Indexers/MejorTorrent.cs @@ -92,7 +92,8 @@ namespace Jackett.Common.Indexers MusicSearchParams = new List { MusicSearchParam.Q - } + }, + SupportsRawSearch = true }, configService: configService, client: w, @@ -415,7 +416,7 @@ namespace Jackett.Common.Indexers return queryWords.All(word => titleWords.Contains(word)); } - private static TorznabQuery ParseQuery(TorznabQuery query) + private TorznabQuery ParseQuery(TorznabQuery query) { // Eg. Doctor.Who.2005.(Доктор.Кто).S02E08 @@ -425,9 +426,10 @@ namespace Jackett.Common.Indexers // query.Episode = 8 var searchTerm = query.GetQueryString(); - // replace non-english alphanumeric characters with spaces + // Server returns a 500 error if a UTF character higher than \u00FF (ÿ) is included, + // so we need to strip them // searchTerm = Doctor Who 2005 - searchTerm = Regex.Replace(searchTerm, @"[^a-zA-Z0-9]+", " "); + searchTerm = Regex.Replace(searchTerm, @"[^\u0001-\u00FF]+", " "); searchTerm = Regex.Replace(searchTerm, @"\s+", " "); searchTerm = searchTerm.Trim(); diff --git a/src/Jackett.Common/Models/TorznabQuery.cs b/src/Jackett.Common/Models/TorznabQuery.cs index a47f2ca0c..bff151c71 100644 --- a/src/Jackett.Common/Models/TorznabQuery.cs +++ b/src/Jackett.Common/Models/TorznabQuery.cs @@ -94,6 +94,7 @@ namespace Jackett.Common.Models || c == ']' || c == '+' || c == '%' + || c == ':' )); return string.Concat(safeTitle); }