mirror of
https://github.com/Radarr/Radarr
synced 2025-02-26 16:13:19 +00:00
Fixed: searching trakt for some series with special characters
This commit is contained in:
parent
1ce58c58af
commit
a7cabc49b4
1 changed files with 3 additions and 1 deletions
|
@ -20,7 +20,7 @@ public class TraktProxy : ISearchForNewSeries, IProvideSeriesInfo
|
|||
{
|
||||
private readonly Logger _logger;
|
||||
private static readonly Regex CollapseSpaceRegex = new Regex(@"\s+", RegexOptions.Compiled);
|
||||
private static readonly Regex InvalidSearchCharRegex = new Regex(@"(?:\*|\(|\)|'|!)", RegexOptions.Compiled);
|
||||
private static readonly Regex InvalidSearchCharRegex = new Regex(@"(?:\*|\(|\)|'|!|@)", RegexOptions.Compiled);
|
||||
|
||||
public TraktProxy(Logger logger)
|
||||
{
|
||||
|
@ -168,7 +168,9 @@ private static string GetSearchTerm(string phrase)
|
|||
phrase = phrase.RemoveAccent().ToLower();
|
||||
phrase = InvalidSearchCharRegex.Replace(phrase, "");
|
||||
phrase = CollapseSpaceRegex.Replace(phrase, " ").Trim().ToLower();
|
||||
phrase = phrase.Trim('-');
|
||||
phrase = HttpUtility.UrlEncode(phrase);
|
||||
|
||||
|
||||
return phrase;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue