diff options
| author | Cody Robibero <cody@robibe.ro> | 2026-09-01 20:45:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-01 20:45:05 -0400 |
| commit | b3766b00d4c5ae38589774b30f4f1e0579a9619f (patch) | |
| tree | 4a9ded9dc16c421c0bed5e35ad59816e9337c92f | |
| parent | ea89b6ebc58b82468ea2b128059791eed685028c (diff) | |
| parent | 20678c9a8c178657881565b7d4147896b604aa60 (diff) | |
fix: return fallback gracefully when requested fallback font is missing
| -rw-r--r-- | Jellyfin.Api/Controllers/SubtitleController.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/SubtitleController.cs b/Jellyfin.Api/Controllers/SubtitleController.cs index e5df873f5b..c4851091c1 100644 --- a/Jellyfin.Api/Controllers/SubtitleController.cs +++ b/Jellyfin.Api/Controllers/SubtitleController.cs @@ -557,7 +557,7 @@ public class SubtitleController : BaseJellyfinApiController if (!string.IsNullOrEmpty(fallbackFontPath)) { var fontFile = _fileSystem.GetFiles(fallbackFontPath) - .First(i => string.Equals(i.Name, name, StringComparison.OrdinalIgnoreCase)); + .FirstOrDefault(i => string.Equals(i.Name, name, StringComparison.OrdinalIgnoreCase)); var fileSize = fontFile?.Length; if (fontFile is not null && fileSize is not null && fileSize > 0) |
