mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-25 22:46:31 -04:00
Fixed: Releases no longer available on the indexer should be removed from the pending queue.
fixes #679
This commit is contained in:
@@ -33,7 +33,7 @@ namespace NzbDrone.Core.Download
|
||||
_httpClient = httpClient;
|
||||
_torrentFileInfoReader = torrentFileInfoReader;
|
||||
}
|
||||
|
||||
|
||||
public override DownloadProtocol Protocol => DownloadProtocol.Torrent;
|
||||
|
||||
public virtual bool PreferTorrentFile => false;
|
||||
@@ -61,7 +61,7 @@ namespace NzbDrone.Core.Download
|
||||
{
|
||||
magnetUrl = torrentInfo.MagnetUrl;
|
||||
}
|
||||
|
||||
|
||||
if (PreferTorrentFile)
|
||||
{
|
||||
if (torrentUrl.IsNotNullOrWhiteSpace())
|
||||
@@ -160,6 +160,12 @@ namespace NzbDrone.Core.Download
|
||||
}
|
||||
catch (HttpException ex)
|
||||
{
|
||||
if (ex.Response.StatusCode == HttpStatusCode.NotFound)
|
||||
{
|
||||
_logger.Error(ex, "Downloading torrent file for episode '{0}' failed since it no longer exists ({1})", remoteEpisode.Release.Title, torrentUrl);
|
||||
throw new ReleaseUnavailableException(remoteEpisode.Release, "Downloading torrent failed", ex);
|
||||
}
|
||||
|
||||
if ((int)ex.Response.StatusCode == 429)
|
||||
{
|
||||
_logger.Error("API Grab Limit reached for {0}", torrentUrl);
|
||||
|
||||
Reference in New Issue
Block a user