mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-13 05:36:36 +00:00
Use artist images for music library thumbnail
This commit is contained in:
@@ -40,7 +40,7 @@ namespace Emby.Server.Implementations.Images
|
||||
includeItemTypes = new[] { BaseItemKind.Series };
|
||||
break;
|
||||
case CollectionType.music:
|
||||
includeItemTypes = new[] { BaseItemKind.MusicAlbum };
|
||||
includeItemTypes = new[] { BaseItemKind.MusicArtist }; // Music albums usually don't have dedicated backdrops, so use artist instead
|
||||
break;
|
||||
case CollectionType.musicvideos:
|
||||
includeItemTypes = new[] { BaseItemKind.MusicVideo };
|
||||
|
||||
@@ -22,7 +22,6 @@ using MediaBrowser.Controller.Channels;
|
||||
using MediaBrowser.Controller.Chapters;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Dto;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Entities.TV;
|
||||
using MediaBrowser.Controller.IO;
|
||||
using MediaBrowser.Controller.Library;
|
||||
@@ -2129,17 +2128,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
};
|
||||
}
|
||||
|
||||
// Music albums usually don't have dedicated backdrops, so return one from the artist instead
|
||||
if (GetType() == typeof(MusicAlbum) && imageType == ImageType.Backdrop)
|
||||
{
|
||||
var artist = FindParent<MusicArtist>();
|
||||
|
||||
if (artist is not null)
|
||||
{
|
||||
return artist.GetImages(imageType).ElementAtOrDefault(imageIndex);
|
||||
}
|
||||
}
|
||||
|
||||
return GetImages(imageType)
|
||||
.ElementAtOrDefault(imageIndex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user