From ce79ab28272da57c1fc2af08494acc7cf6506be2 Mon Sep 17 00:00:00 2001 From: markus101 Date: Wed, 2 Mar 2011 18:12:33 -0800 Subject: [PATCH] Display Error when RSS Feed doesn't return any items. --- NzbDrone.Core/Providers/RssSyncProvider.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/NzbDrone.Core/Providers/RssSyncProvider.cs b/NzbDrone.Core/Providers/RssSyncProvider.cs index a06b13a20..44c78c6d4 100644 --- a/NzbDrone.Core/Providers/RssSyncProvider.cs +++ b/NzbDrone.Core/Providers/RssSyncProvider.cs @@ -100,7 +100,16 @@ private void SyncWithRss() var indexer = new FeedInfoModel(i.IndexerName, i.RssUrl); - foreach (RssItem item in _rss.GetFeed(indexer)) + var feedItems = _rss.GetFeed(indexer); + + if (feedItems.Count() == 0) + { + _rssSyncNotification.CurrentStatus = String.Format("Failed to download RSS Feed: {0}", // + i.IndexerName); + continue; //No need to process anything else + } + + foreach (RssItem item in feedItems) { NzbInfoModel nzb = Parser.ParseNzbInfo(indexer, item); QueueIfWanted(nzb, i);