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:
parent
8773d38ddd
commit
7934003b5e
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user