Fixed: Releases no longer available on the indexer should be removed from the pending queue

This commit is contained in:
Qstick
2017-11-16 12:32:31 -05:00
parent acd05ce6cd
commit fa051257e3
10 changed files with 102 additions and 40 deletions
@@ -1,4 +1,4 @@
using System.Net;
using System.Net;
using NzbDrone.Common.Disk;
using NzbDrone.Common.Http;
using NzbDrone.Core.Exceptions;
@@ -46,6 +46,12 @@ namespace NzbDrone.Core.Download
}
catch (HttpException ex)
{
if (ex.Response.StatusCode == HttpStatusCode.NotFound)
{
_logger.Error(ex, "Downloading nzb file for album '{0}' failed since it no longer exists ({1})", remoteAlbum.Release.Title, url);
throw new ReleaseUnavailableException(remoteAlbum.Release, "Downloading torrent failed", ex);
}
if ((int)ex.Response.StatusCode == 429)
{
_logger.Error("API Grab Limit reached for {0}", url);