Fixed: Removed accents before searching indexers

This commit is contained in:
Mark McDowall 2014-12-08 22:22:34 -08:00
parent 291b5f48d4
commit fc4170c581
2 changed files with 3 additions and 0 deletions

View File

@ -13,6 +13,7 @@ namespace NzbDrone.Core.Test.IndexerSearchTests
[TestCase("Hawaii Five-0", Result = "Hawaii+Five+0")]
[TestCase("Franklin & Bash", Result = "Franklin+and+Bash")]
[TestCase("Chicago P.D.", Result = "Chicago+PD")]
[TestCase("Kourtney And Khloé Take The Hamptons", Result = "Kourtney+And+Khloe+Take+The+Hamptons")]
public string should_replace_some_special_characters(string input)
{
Subject.SceneTitles = new List<string> { input };

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using NzbDrone.Common.EnsureThat;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.Tv;
namespace NzbDrone.Core.IndexerSearch.Definitions
@ -37,6 +38,7 @@ namespace NzbDrone.Core.IndexerSearch.Definitions
//remove any repeating +s
cleanTitle = Regex.Replace(cleanTitle, @"\+{2,}", "+");
cleanTitle = cleanTitle.RemoveAccent();
return cleanTitle.Trim('+', ' ');
}
}