mirror of
https://github.com/lidarr/Lidarr
synced 2025-02-22 05:50:56 +00:00
Fixed: Don't download unknown artwork
(cherry picked from commit aecc8295c8c3ce39040d03a1f79f775e1c910362) Fixes #3719
This commit is contained in:
parent
7743fd8d14
commit
3cf8248752
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
|
||||
|
|
|
@ -138,6 +138,11 @@ private bool EnsureArtistCovers(Artist artist)
|
|||
|
||||
foreach (var cover in artist.Metadata.Value.Images)
|
||||
{
|
||||
if (cover.CoverType == MediaCoverTypes.Unknown)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var fileName = GetCoverPath(artist.Id, MediaCoverEntity.Artist, cover.CoverType, cover.Extension);
|
||||
var alreadyExists = false;
|
||||
|
||||
|
@ -192,8 +197,14 @@ public bool EnsureAlbumCovers(Album album)
|
|||
|
||||
foreach (var cover in album.Images.Where(e => e.CoverType == MediaCoverTypes.Cover))
|
||||
{
|
||||
if (cover.CoverType == MediaCoverTypes.Unknown)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var fileName = GetCoverPath(album.Id, MediaCoverEntity.Album, cover.CoverType, cover.Extension, null);
|
||||
var alreadyExists = false;
|
||||
|
||||
try
|
||||
{
|
||||
var serverFileHeaders = _httpClient.Head(new HttpRequest(cover.Url) { AllowAutoRedirect = true }).Headers;
|
||||
|
|
Loading…
Reference in a new issue