The Free Software Media System - Server Backend & API
Skip missing images when creating collages (#14344)
Tim Eiseledb36be7a6b8a
diff --git a/src/Jellyfin.Drawing.Skia/SkiaHelper.cs b/src/Jellyfin.Drawing.Skia/SkiaHelper.csindex bd1b2b0da0..87446236cd 100644--- a/src/Jellyfin.Drawing.Skia/SkiaHelper.cs+++ b/src/Jellyfin.Drawing.Skia/SkiaHelper.cs@@ -1,4 +1,5 @@using System.Collections.Generic;+using System.IO;using SkiaSharp;namespace Jellyfin.Drawing.Skia;@@ -27,12 +28,17 @@ public static class SkiaHelpercurrentIndex = 0;}- SKBitmap? bitmap = skiaEncoder.Decode(paths[currentIndex], false, null, out _);-+ var imagePath = paths[currentIndex];imagesTested[currentIndex] = 0;-currentIndex++;+ if (!Path.Exists(imagePath))+ {+ continue;+ }++ SKBitmap? bitmap = skiaEncoder.Decode(imagePath, false, null, out _);+if (bitmap is not null){newIndex = currentIndex;