Fixed: If Nzbget failed to add an nzb, Sonarr will try another but not blacklist it.

pull/6/head
Taloth Saldono 10 years ago
parent 62f4fc5e58
commit b62d36bdbe

@ -9,6 +9,7 @@ using NzbDrone.Core.Download.Clients.Nzbget;
using NzbDrone.Test.Common;
using NzbDrone.Core.RemotePathMappings;
using NzbDrone.Common.Disk;
using NzbDrone.Core.Download.Clients;
namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
{
@ -268,7 +269,6 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
items.First().Status.Should().Be(DownloadItemStatus.Failed);
}
[Test]
public void Download_should_return_unique_id()
{
@ -281,6 +281,16 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
id.Should().NotBeNullOrEmpty();
}
[Test]
public void Download_should_throw_if_failed()
{
GivenFailedDownload();
var remoteEpisode = CreateRemoteEpisode();
Assert.Throws<DownloadClientException>(() => Subject.Download(remoteEpisode));
}
[Test]
public void GetItems_should_ignore_downloads_from_other_categories()
{

@ -36,6 +36,11 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
var response = _proxy.DownloadNzb(fileContent, filename, category, priority, Settings);
if (response == null)
{
throw new DownloadClientException("Failed to add nzb {0}", filename);
}
return response;
}
@ -43,7 +48,6 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
{
NzbgetGlobalStatus globalStatus;
List<NzbgetQueueItem> queue;
Dictionary<Int32, NzbgetPostQueueItem> postQueue;
try
{

Loading…
Cancel
Save