From 21ac5d804c6990df6f696a9e4bd754eb6706e5d5 Mon Sep 17 00:00:00 2001 From: markus101 Date: Wed, 16 Feb 2011 18:17:01 -0800 Subject: [PATCH] RssSync improvements and fixes. --- NzbDrone.Core/Providers/EpisodeProvider.cs | 7 ++++--- NzbDrone.Core/Providers/RssSyncProvider.cs | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/NzbDrone.Core/Providers/EpisodeProvider.cs b/NzbDrone.Core/Providers/EpisodeProvider.cs index 2a828b1c0..c3bb287b6 100644 --- a/NzbDrone.Core/Providers/EpisodeProvider.cs +++ b/NzbDrone.Core/Providers/EpisodeProvider.cs @@ -77,6 +77,7 @@ namespace NzbDrone.Core.Providers if (IsSeasonIgnored(episode)) return false; + //Quickly check if this quality is wanted at all (We will later check if the quality is still needed) if (!_series.QualityWanted(episode.SeriesId, episode.Quality)) { Logger.Debug("Quality [{0}] is not wanted for: {1}", episode.Quality, episode.SeriesTitle); @@ -88,7 +89,7 @@ namespace NzbDrone.Core.Providers if (dbEpisode == null) { - //Todo: How do we want to handle this really? Episode could be released before information is on TheTvDB (Parks and Rec did this a lot in the first season from experience) + //Todo: How do we want to handle this really? Episode could be released before information is on TheTvDB (Parks and Rec did this a lot in the first season, from experience) throw new NotImplementedException("Episode was not found in the database"); } @@ -126,7 +127,7 @@ namespace NzbDrone.Core.Providers } } } - return true; //If we get to this point and the file has not yet been rejected then accept it + return true; } //IsInHistory? (NZBDrone) @@ -136,7 +137,7 @@ namespace NzbDrone.Core.Providers return false; } - return true; + return true;//If we get to this point and the file has not yet been rejected then accept it } public void RefreshEpisodeInfo(int seriesId) diff --git a/NzbDrone.Core/Providers/RssSyncProvider.cs b/NzbDrone.Core/Providers/RssSyncProvider.cs index 83eb9fa50..1f3c7b508 100644 --- a/NzbDrone.Core/Providers/RssSyncProvider.cs +++ b/NzbDrone.Core/Providers/RssSyncProvider.cs @@ -164,8 +164,11 @@ namespace NzbDrone.Core.Providers return; var titleFix = GetTitleFix(new List { episode }, episodeModel.SeriesId); - _sab.IsInQueue(titleFix); + + if (_sab.IsInQueue(titleFix)) + return; } + var sabResult = _sab.AddByUrl(nzb.Link.ToString(), nzb.TitleFix); } }