From 4b48edab0a7c2c93e4a7f4d281bf080e05b1fb0d Mon Sep 17 00:00:00 2001 From: carrossos <99329036+carrossos@users.noreply.github.com> Date: Thu, 22 May 2025 07:57:11 +0700 Subject: [PATCH] Treat HTTP 410 response for failed download similarly to HTTP 404 (cherry picked from commit 818ae02a7a8f0a8ea0a44e0015e2667d96453332) --- src/NzbDrone.Core/Download/TorrentClientBase.cs | 2 +- src/NzbDrone.Core/Download/UsenetClientBase.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/Download/TorrentClientBase.cs b/src/NzbDrone.Core/Download/TorrentClientBase.cs index 4e3ec11ab..5df5f7ce0 100644 --- a/src/NzbDrone.Core/Download/TorrentClientBase.cs +++ b/src/NzbDrone.Core/Download/TorrentClientBase.cs @@ -170,7 +170,7 @@ namespace NzbDrone.Core.Download } catch (HttpException ex) { - if (ex.Response.StatusCode == HttpStatusCode.NotFound) + if (ex.Response.StatusCode is HttpStatusCode.NotFound or HttpStatusCode.Gone) { _logger.Error(ex, "Downloading torrent file for album '{0}' failed since it no longer exists ({1})", remoteAlbum.Release.Title, torrentUrl); throw new ReleaseUnavailableException(remoteAlbum.Release, "Downloading torrent failed", ex); diff --git a/src/NzbDrone.Core/Download/UsenetClientBase.cs b/src/NzbDrone.Core/Download/UsenetClientBase.cs index 4985ba4c3..4698334aa 100644 --- a/src/NzbDrone.Core/Download/UsenetClientBase.cs +++ b/src/NzbDrone.Core/Download/UsenetClientBase.cs @@ -58,7 +58,7 @@ namespace NzbDrone.Core.Download } catch (HttpException ex) { - if (ex.Response.StatusCode == HttpStatusCode.NotFound) + if (ex.Response.StatusCode is HttpStatusCode.NotFound or HttpStatusCode.Gone) { _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 nzb failed", ex);