diff --git a/src/NzbDrone.Core.Test/Download/Pending/PendingReleaseServiceTests/PendingReleaseServiceFixture.cs b/src/NzbDrone.Core.Test/Download/Pending/PendingReleaseServiceTests/PendingReleaseServiceFixture.cs index 5e2c756f3..37f979ba9 100644 --- a/src/NzbDrone.Core.Test/Download/Pending/PendingReleaseServiceTests/PendingReleaseServiceFixture.cs +++ b/src/NzbDrone.Core.Test/Download/Pending/PendingReleaseServiceTests/PendingReleaseServiceFixture.cs @@ -1,19 +1,12 @@ using System; using System.Collections.Generic; -using FizzWare.NBuilder; -using Marr.Data; using Moq; using NUnit.Framework; -using NzbDrone.Common.Extensions; using NzbDrone.Core.DecisionEngine; using NzbDrone.Core.Download.Pending; using NzbDrone.Core.Indexers; -using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; -using NzbDrone.Core.Profiles; -using NzbDrone.Core.Qualities; using NzbDrone.Core.Test.Framework; -using NzbDrone.Core.Tv; using FluentAssertions; namespace NzbDrone.Core.Test.Download.Pending.PendingReleaseServiceTests diff --git a/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs b/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs index 321d908fd..8585a1704 100644 --- a/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs +++ b/src/NzbDrone.Core/Download/Pending/PendingReleaseService.cs @@ -299,12 +299,12 @@ private void RemoveRejected(List rejected) foreach (var rejectedRelease in rejected) { - var matching = pending.SingleOrDefault(MatchingReleasePredicate(rejectedRelease.RemoteEpisode.Release)); + var matching = pending.Where(MatchingReleasePredicate(rejectedRelease.RemoteEpisode.Release)); - if (matching != null) + foreach (var pendingRelease in matching) { _logger.Debug("Removing previously pending release, as it has now been rejected."); - Delete(matching); + Delete(pendingRelease); } } }