1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-27 18:17:13 +00:00

Ampersand removed from title before searching

Fixed: Remove "&" from title before searching TheTVDB
This commit is contained in:
Mark McDowall 2012-12-20 13:27:54 -08:00
parent 5113bf3878
commit c2f9679141
2 changed files with 7 additions and 0 deletions

View file

@ -36,6 +36,7 @@ public void TearDown()
[TestCase("The Simpsons")] [TestCase("The Simpsons")]
[TestCase("Family Guy")] [TestCase("Family Guy")]
[TestCase("South Park")] [TestCase("South Park")]
[TestCase("Franklin & Bash")]
public void successful_search(string title) public void successful_search(string title)
{ {
var result = tvDbProvider.SearchSeries(title); var result = tvDbProvider.SearchSeries(title);

View file

@ -37,6 +37,12 @@ public virtual IList<TvdbSearchResult> SearchSeries(string title)
{ {
Logger.Debug("Searching TVDB for '{0}'", title); Logger.Debug("Searching TVDB for '{0}'", title);
if(title.Contains(" & "))
{
Logger.Debug("Removing ampersand before searching");
title = title.Replace(" & ", " ");
}
var result = _handler.SearchSeries(title); var result = _handler.SearchSeries(title);
Logger.Debug("Search for '{0}' returned {1} possible results", title, result.Count); Logger.Debug("Search for '{0}' returned {1} possible results", title, result.Count);