mirror of
https://github.com/Readarr/Readarr
synced 2026-01-03 06:06:11 +01:00
Fixed: Don't download unknown artwork
(cherry picked from commit aecc8295c8c3ce39040d03a1f79f775e1c910362) Fixes #2534
This commit is contained in:
parent
accd16da71
commit
baf19897ff
2 changed files with 13 additions and 1 deletions
|
|
@ -15,7 +15,8 @@ public enum MediaCoverTypes
|
|||
Headshot = 5,
|
||||
Cover = 6,
|
||||
Disc = 7,
|
||||
Logo = 8
|
||||
Logo = 8,
|
||||
Clearart = 9
|
||||
}
|
||||
|
||||
public enum MediaCoverEntity
|
||||
|
|
|
|||
|
|
@ -121,6 +121,11 @@ private void EnsureAuthorCovers(Author author)
|
|||
|
||||
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 @@ public void EnsureBookCovers(Book book)
|
|||
{
|
||||
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue