修复 Emby 大海报在剧集图缓存被淘汰后显示占位图

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
truewhile
2026-09-12 11:43:51 +08:00
parent 8f64f961ac
commit 3c2bfb14ca
7 changed files with 267 additions and 57 deletions
+4 -2
View File
@@ -15,7 +15,8 @@ type embyItemsCacheValue struct {
}
type embyLatestCacheValue struct {
Items []map[string]any `json:"items"`
Items []map[string]any `json:"items"`
Artwork map[string]embyArtworkRef `json:"artwork,omitempty"`
}
func (e *EmbyService) embyItemsCacheKey(kind string, p ItemsParams) string {
@@ -43,7 +44,8 @@ func (e *EmbyService) embyItemsCacheKey(kind string, p ItemsParams) string {
}
func (e *EmbyService) embyLatestCacheKey(userID, parentID string, limit int) string {
sum := sha256.Sum256([]byte(strings.Join([]string{"latest", userID, parentID, strconv.Itoa(limit)}, "|")))
// v2: payload tags for virtual artwork changed so clients drop cached placeholders.
sum := sha256.Sum256([]byte(strings.Join([]string{"latest-v2", userID, parentID, strconv.Itoa(limit)}, "|")))
return "media:emby:" + hex.EncodeToString(sum[:])
}