fix: add image count check to splash screen generation (#11245)

pull/11260/head
Mikal S 2 months ago committed by GitHub
parent 915df87716
commit 7cfe0009e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -554,9 +554,13 @@ public class SkiaEncoder : IImageEncoder
/// <inheritdoc /> /// <inheritdoc />
public void CreateSplashscreen(IReadOnlyList<string> posters, IReadOnlyList<string> backdrops) public void CreateSplashscreen(IReadOnlyList<string> posters, IReadOnlyList<string> backdrops)
{ {
var splashBuilder = new SplashscreenBuilder(this); // Only generate the splash screen if we have at least one poster and at least one backdrop/thumbnail.
var outputPath = Path.Combine(_appPaths.DataPath, "splashscreen.png"); if (posters.Count > 0 && backdrops.Count > 0)
splashBuilder.GenerateSplash(posters, backdrops, outputPath); {
var splashBuilder = new SplashscreenBuilder(this);
var outputPath = Path.Combine(_appPaths.DataPath, "splashscreen.png");
splashBuilder.GenerateSplash(posters, backdrops, outputPath);
}
} }
/// <inheritdoc /> /// <inheritdoc />

Loading…
Cancel
Save