mirror of
https://github.com/Lidarr/Lidarr
synced 2025-12-06 08:25:54 +01:00
Treat HTTP 410 response for failed download similarly to HTTP 404
(cherry picked from commit 818ae02a7a8f0a8ea0a44e0015e2667d96453332)
This commit is contained in:
parent
e087574de7
commit
4b48edab0a
2 changed files with 2 additions and 2 deletions
|
|
@ -170,7 +170,7 @@ private async Task<string> DownloadFromWebUrl(RemoteAlbum remoteAlbum, IIndexer
|
||||||
}
|
}
|
||||||
catch (HttpException ex)
|
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);
|
_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);
|
throw new ReleaseUnavailableException(remoteAlbum.Release, "Downloading torrent failed", ex);
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ public override async Task<string> Download(RemoteAlbum remoteAlbum, IIndexer in
|
||||||
}
|
}
|
||||||
catch (HttpException ex)
|
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);
|
_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);
|
throw new ReleaseUnavailableException(remoteAlbum.Release, "Downloading nzb failed", ex);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue