From baf19897ff6eb7ede17a18245ab0be61bbaf8634 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 22 May 2023 09:00:36 -0700 Subject: [PATCH] Fixed: Don't download unknown artwork (cherry picked from commit aecc8295c8c3ce39040d03a1f79f775e1c910362) Fixes #2534 --- src/NzbDrone.Core/MediaCover/MediaCover.cs | 3 ++- src/NzbDrone.Core/MediaCover/MediaCoverService.cs | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/MediaCover/MediaCover.cs b/src/NzbDrone.Core/MediaCover/MediaCover.cs index 2b2fa5ec4..446864716 100644 --- a/src/NzbDrone.Core/MediaCover/MediaCover.cs +++ b/src/NzbDrone.Core/MediaCover/MediaCover.cs @@ -15,7 +15,8 @@ namespace NzbDrone.Core.MediaCover Headshot = 5, Cover = 6, Disc = 7, - Logo = 8 + Logo = 8, + Clearart = 9 } public enum MediaCoverEntity diff --git a/src/NzbDrone.Core/MediaCover/MediaCoverService.cs b/src/NzbDrone.Core/MediaCover/MediaCoverService.cs index 8071fb1ea..ac423e415 100644 --- a/src/NzbDrone.Core/MediaCover/MediaCoverService.cs +++ b/src/NzbDrone.Core/MediaCover/MediaCoverService.cs @@ -121,6 +121,11 @@ namespace NzbDrone.Core.MediaCover foreach (var cover in author.Metadata.Value.Images) { + if (cover.CoverType == MediaCoverTypes.Unknown) + { + continue; + } + var fileName = GetCoverPath(author.Id, MediaCoverEntity.Author, cover.CoverType, cover.Extension); var alreadyExists = false; @@ -166,8 +171,14 @@ namespace NzbDrone.Core.MediaCover { foreach (var cover in book.Editions.Value.Single(x => x.Monitored).Images.Where(e => e.CoverType == MediaCoverTypes.Cover)) { + if (cover.CoverType == MediaCoverTypes.Unknown) + { + continue; + } + var fileName = GetCoverPath(book.Id, MediaCoverEntity.Book, cover.CoverType, cover.Extension, null); var alreadyExists = false; + try { var serverFileHeaders = GetServerHeaders(cover.Url);