Skip to content

The Free Software Media System - Server Backend & API

Fix broken chapter image placeholders when no image is present (#14230)

theguymadmax4f3b49472a78
diff --git a/Jellyfin.Server.Implementations/Item/ChapterRepository.cs b/Jellyfin.Server.Implementations/Item/ChapterRepository.cs
index 9f2d473468..e0d23a2613 100644
--- a/Jellyfin.Server.Implementations/Item/ChapterRepository.cs
+++ b/Jellyfin.Server.Implementations/Item/ChapterRepository.cs
@@ -112,7 +112,12 @@ public class ChapterRepository : IChapterRepository
ImagePath = chapterInfo.ImagePath,
Name = chapterInfo.Name,
};
- chapterEntity.ImageTag = _imageProcessor.GetImageCacheTag(baseItemPath, chapterEntity.ImageDateModified);
+
+ if (!string.IsNullOrEmpty(chapterInfo.ImagePath))
+ {
+ chapterEntity.ImageTag = _imageProcessor.GetImageCacheTag(baseItemPath, chapterEntity.ImageDateModified);
+ }
+
return chapterEntity;
}
}