浏览代码

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

theguymadmax 5 天之前
父节点
当前提交
4f3b49472a
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      Jellyfin.Server.Implementations/Item/ChapterRepository.cs

+ 6 - 1
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;
     }
 }