Fixed: searching trakt for some series with special characters

pull/4/head
Mark McDowall 11 years ago
parent 1ce58c58af
commit a7cabc49b4

@ -20,7 +20,7 @@ namespace NzbDrone.Core.MetadataSource
{
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 @@ namespace NzbDrone.Core.MetadataSource
phrase = phrase.RemoveAccent().ToLower();
phrase = InvalidSearchCharRegex.Replace(phrase, "");
phrase = CollapseSpaceRegex.Replace(phrase, " ").Trim().ToLower();
phrase = phrase.Trim('-');
phrase = HttpUtility.UrlEncode(phrase);
return phrase;
}

Loading…
Cancel
Save