mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
EpisodeSearch properly uses PerformSearch.
PerformSearch will handle shows that air daily.
This commit is contained in:
parent
e16f83c433
commit
cadccb4360
6 changed files with 294 additions and 27 deletions
|
@ -179,6 +179,33 @@ namespace NzbDrone.Core.Providers.Indexer
|
|||
|
||||
}
|
||||
|
||||
public virtual IList<EpisodeParseResult> FetchDailyEpisode(string seriesTitle, DateTime airDate)
|
||||
{
|
||||
_logger.Debug("Searching {0} for {1}-{2}", Name, seriesTitle, airDate.ToShortDateString());
|
||||
|
||||
var result = new List<EpisodeParseResult>();
|
||||
|
||||
var searchModel = new SearchModel
|
||||
{
|
||||
SeriesTitle = GetQueryTitle(seriesTitle),
|
||||
AirDate = airDate,
|
||||
SearchType = SearchType.DailySearch
|
||||
};
|
||||
|
||||
var searchUrls = GetSearchUrls(searchModel);
|
||||
|
||||
foreach (var url in searchUrls)
|
||||
{
|
||||
result.AddRange(Fetch(url));
|
||||
}
|
||||
|
||||
result = result.Where(e => e.CleanTitle == Parser.NormalizeTitle(seriesTitle)).ToList();
|
||||
|
||||
_logger.Info("Finished searching {0} for {1}-{2}, Found {3}", Name, seriesTitle, airDate.ToShortDateString(), result.Count);
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
private IEnumerable<EpisodeParseResult> Fetch(string url)
|
||||
{
|
||||
var result = new List<EpisodeParseResult>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue