From c3b25878d4194a4612c79f7ac3d18ef212f51ca7 Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Tue, 30 Jul 2013 13:30:34 -0700 Subject: [PATCH] do a check to see if daily episode has airdate before attempting a search. --- NzbDrone.Core/IndexerSearch/NzbSearchService.cs | 5 +++++ NzbDrone.Core/Indexers/SyndicationFeedXmlReader.cs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NzbDrone.Core/IndexerSearch/NzbSearchService.cs b/NzbDrone.Core/IndexerSearch/NzbSearchService.cs index b0c151933..03502fc82 100644 --- a/NzbDrone.Core/IndexerSearch/NzbSearchService.cs +++ b/NzbDrone.Core/IndexerSearch/NzbSearchService.cs @@ -54,6 +54,11 @@ namespace NzbDrone.Core.IndexerSearch if (series.SeriesType == SeriesTypes.Daily) { + if (string.IsNullOrWhiteSpace(episode.AirDate)) + { + throw new InvalidOperationException("Daily episode is missing AirDate. Try to refresh series info."); + } + return SearchDaily(episode.SeriesId, DateTime.ParseExact(episode.AirDate, Episode.AIR_DATE_FORMAT, CultureInfo.InvariantCulture)); } diff --git a/NzbDrone.Core/Indexers/SyndicationFeedXmlReader.cs b/NzbDrone.Core/Indexers/SyndicationFeedXmlReader.cs index f6024a9f8..30642a721 100644 --- a/NzbDrone.Core/Indexers/SyndicationFeedXmlReader.cs +++ b/NzbDrone.Core/Indexers/SyndicationFeedXmlReader.cs @@ -72,7 +72,7 @@ namespace NzbDrone.Core.Indexers return dateVal; } - public void CheckForError() + private void CheckForError() { if (MoveToContent() == XmlNodeType.Element) {