1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 02:22:31 +01:00

Fixed: Rare error when removing pending items that have been rejected

This commit is contained in:
Mark McDowall 2016-04-27 16:16:43 -07:00
parent 8773d38ddd
commit 7934003b5e
2 changed files with 3 additions and 10 deletions

View File

@ -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

View File

@ -299,12 +299,12 @@ private void RemoveRejected(List<DownloadDecision> 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);
}
}
}