From 576f5c5c09804cabc0df2425d6a2857fafe3bb17 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 23 Nov 2011 20:50:09 -0800 Subject: [PATCH] EpisodeSearch will now notify if no download is found. --- NzbDrone.Core/Providers/SearchProvider.cs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/NzbDrone.Core/Providers/SearchProvider.cs b/NzbDrone.Core/Providers/SearchProvider.cs index 9b5f43a21..3e07d6d1e 100644 --- a/NzbDrone.Core/Providers/SearchProvider.cs +++ b/NzbDrone.Core/Providers/SearchProvider.cs @@ -155,15 +155,12 @@ namespace NzbDrone.Core.Providers Logger.Debug("Finished searching all indexers. Total {0}", reports.Count); notification.CurrentMessage = "Processing search results"; + if (ProcessSearchResults(notification, reports, series, episode.SeasonNumber, episode.EpisodeNumber).Count == 1) + return true; - //TODO:fix this so when search returns more than one episode - //TODO:-its populated with more than the original episode. - reports.ForEach(c => - { - c.Series = series; - }); - - return (ProcessSearchResults(notification, reports, series, episode.SeasonNumber, episode.EpisodeNumber).Count == 1); + Logger.Warn("Unable to find {0} in any of indexers.", episode); + notification.CurrentMessage = String.Format("Unable to find {0} in any of indexers.", episode); + return false; } public List PerformSearch(ProgressNotification notification, Series series, int seasonNumber, IList episodes = null)