mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
fix: add image count check to splash screen generation (#11245)
This commit is contained in:
parent
915df87716
commit
7cfe0009e5
@ -553,11 +553,15 @@ public class SkiaEncoder : IImageEncoder
|
|||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public void CreateSplashscreen(IReadOnlyList<string> posters, IReadOnlyList<string> backdrops)
|
public void CreateSplashscreen(IReadOnlyList<string> posters, IReadOnlyList<string> backdrops)
|
||||||
|
{
|
||||||
|
// Only generate the splash screen if we have at least one poster and at least one backdrop/thumbnail.
|
||||||
|
if (posters.Count > 0 && backdrops.Count > 0)
|
||||||
{
|
{
|
||||||
var splashBuilder = new SplashscreenBuilder(this);
|
var splashBuilder = new SplashscreenBuilder(this);
|
||||||
var outputPath = Path.Combine(_appPaths.DataPath, "splashscreen.png");
|
var outputPath = Path.Combine(_appPaths.DataPath, "splashscreen.png");
|
||||||
splashBuilder.GenerateSplash(posters, backdrops, outputPath);
|
splashBuilder.GenerateSplash(posters, backdrops, outputPath);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public int CreateTrickplayTile(ImageCollageOptions options, int quality, int imgWidth, int? imgHeight)
|
public int CreateTrickplayTile(ImageCollageOptions options, int quality, int imgWidth, int? imgHeight)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user