Fixed issues with searching and the results being filtered before the SearchProvider could properly handle them.

pull/4/head
Mark McDowall 13 years ago
parent 413991485f
commit fb17765d3a

@ -202,10 +202,6 @@ namespace NzbDrone.Core.Test
Mark500Inconclusive();
result.Should().NotBeEmpty();
result.Should().OnlyContain(r => r.SeasonNumber == season);
result.Should().OnlyContain(r => r.EpisodeNumbers.Contains(episode));
result.Should().OnlyContain(r => r.CleanTitle == Parser.NormalizeTitle(title));
result.Should().Contain(r => r.SeasonNumber == season && r.EpisodeNumbers.Contains(episode));
}
[TestCase("simpsons", 21, 23)]
@ -227,9 +223,6 @@ namespace NzbDrone.Core.Test
Mark500Inconclusive();
result.Should().NotBeEmpty();
result.Should().OnlyContain(r => r.CleanTitle == Parser.NormalizeTitle(title));
result.Should().OnlyContain(r => r.SeasonNumber == season);
result.Should().OnlyContain(r => r.EpisodeNumbers.Contains(episode));
}
[Test]
@ -250,17 +243,12 @@ namespace NzbDrone.Core.Test
Mark500Inconclusive();
result.Should().NotBeEmpty();
result.Should().OnlyContain(r => r.CleanTitle == "simpsons");
result.Should().OnlyContain(r => r.SeasonNumber == 21);
result.Should().OnlyContain(r => r.EpisodeNumbers.Contains(23));
}
[Test]
public void nzbmatrix_multi_word_search_returns_valid_results()
{
Mocker.GetMock<ConfigProvider>()
.SetupGet(c => c.NzbMatrixUsername)
.Returns("");
@ -276,9 +264,6 @@ namespace NzbDrone.Core.Test
Mark500Inconclusive();
result.Should().NotBeEmpty();
result.Should().OnlyContain(r => r.CleanTitle == "bluebloods");
result.Should().OnlyContain(r => r.SeasonNumber == 1);
result.Should().OnlyContain(r => r.EpisodeNumbers.Contains(19));
}

@ -100,8 +100,6 @@ namespace NzbDrone.Core.Providers.Indexer
var searchUrls = GetSeasonSearchUrls(GetQueryTitle(seriesTitle), seasonNumber);
var result = Fetch(searchUrls);
result = result.Where(e => e.CleanTitle == Parser.NormalizeTitle(seriesTitle)).ToList();
_logger.Info("Finished searching {0} for {1}-S{2}, Found {3}", Name, seriesTitle, seasonNumber, result.Count);
return result;
}
@ -115,9 +113,6 @@ namespace NzbDrone.Core.Providers.Indexer
var result = Fetch(searchUrls);
result = result.Where(e => e.CleanTitle == Parser.NormalizeTitle(seriesTitle) &&
e.SeasonNumber == seasonNumber).ToList();
_logger.Info("Finished searching {0} for {1}-S{2}, Found {3}", Name, seriesTitle, seasonNumber, result.Count);
return result;
}
@ -130,10 +125,6 @@ namespace NzbDrone.Core.Providers.Indexer
var result = Fetch(searchUrls);
result = result.Where(e => e.CleanTitle == Parser.NormalizeTitle(seriesTitle) &&
e.SeasonNumber == seasonNumber && e.EpisodeNumbers.Contains(episodeNumber))
.ToList();
_logger.Info("Finished searching {0} for {1}-S{2}E{3:00}, Found {4}", Name, seriesTitle, seasonNumber, episodeNumber, result.Count);
return result;
@ -147,9 +138,6 @@ namespace NzbDrone.Core.Providers.Indexer
var result = Fetch(searchUrls);
result = result.Where(e => e.CleanTitle == Parser.NormalizeTitle(seriesTitle) &&
e.AirDate.HasValue && e.AirDate.Value.Date == airDate.Date).ToList();
_logger.Info("Finished searching {0} for {1}-{2}, Found {3}", Name, seriesTitle, airDate.ToShortDateString(), result.Count);
return result;

Loading…
Cancel
Save