From a10759c7e983ae71980a61f0049d0fa332476872 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 518eafbc50..0b0b37d81b 100644 --- a/src/NzbDrone.Core/Download/TorrentClientBase.cs +++ b/src/NzbDrone.Core/Download/TorrentClientBase.cs @@ -172,7 +172,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 movie '{0}' failed since it no longer exists ({1})", remoteMovie.Release.Title, torrentUrl); throw new ReleaseUnavailableException(remoteMovie.Release, "Downloading torrent failed", ex); diff --git a/src/NzbDrone.Core/Download/UsenetClientBase.cs b/src/NzbDrone.Core/Download/UsenetClientBase.cs index 6d459bf901..c83319b3bd 100644 --- a/src/NzbDrone.Core/Download/UsenetClientBase.cs +++ b/src/NzbDrone.Core/Download/UsenetClientBase.cs @@ -59,7 +59,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 movie '{0}' failed since it no longer exists ({1})", remoteMovie.Release.Title, url); throw new ReleaseUnavailableException(remoteMovie.Release, "Downloading nzb failed", ex);