mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 14:03:03 +03:00
Use backdrop with library name as library thumbnail
This commit is contained in:
@@ -133,9 +133,20 @@ namespace Emby.Server.Implementations.Images
|
||||
|
||||
protected virtual IEnumerable<string> GetStripCollageImagePaths(BaseItem primaryItem, IEnumerable<BaseItem> items)
|
||||
{
|
||||
var useBackdrop = primaryItem is CollectionFolder;
|
||||
return items
|
||||
.Select(i =>
|
||||
{
|
||||
// Use Backdrop instead of Primary image for Library images.
|
||||
if (useBackdrop)
|
||||
{
|
||||
var backdrop = i.GetImageInfo(ImageType.Backdrop, 0);
|
||||
if (backdrop != null && backdrop.IsLocalFile)
|
||||
{
|
||||
return backdrop.Path;
|
||||
}
|
||||
}
|
||||
|
||||
var image = i.GetImageInfo(ImageType.Primary, 0);
|
||||
if (image != null && image.IsLocalFile)
|
||||
{
|
||||
@@ -190,7 +201,7 @@ namespace Emby.Server.Implementations.Images
|
||||
return null;
|
||||
}
|
||||
|
||||
ImageProcessor.CreateImageCollage(options);
|
||||
ImageProcessor.CreateImageCollage(options, primaryItem.Name);
|
||||
return outputPath;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user