Skip missing images when creating collages (#14344)
Some checks failed
Merge Conflict Labeler / Labeling (push) Has been cancelled
CodeQL / Analyze (csharp) (push) Has been cancelled
OpenAPI / OpenAPI - HEAD (push) Has been cancelled
OpenAPI / OpenAPI - BASE (push) Has been cancelled
Tests / run-tests (macos-latest) (push) Has been cancelled
Tests / run-tests (ubuntu-latest) (push) Has been cancelled
Tests / run-tests (windows-latest) (push) Has been cancelled
Project Automation / Project board (push) Has been cancelled
OpenAPI / OpenAPI - Difference (push) Has been cancelled
OpenAPI / OpenAPI - Publish Unstable Spec (push) Has been cancelled
OpenAPI / OpenAPI - Publish Stable Spec (push) Has been cancelled

* Skip missing images when creating collages
This commit is contained in:
Tim Eisele
2025-06-21 12:23:08 +02:00
committed by GitHub
parent 85f158e1dd
commit db36be7a6b

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.IO;
using SkiaSharp;
namespace Jellyfin.Drawing.Skia;
@@ -27,12 +28,17 @@ public static class SkiaHelper
currentIndex = 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;