Change resized image cache key

This commit is contained in:
Deluan 2024-06-08 13:37:30 -04:00 committed by Joe Stump
parent 59aaf56b0d
commit 883c6bb591
No known key found for this signature in database
GPG Key ID: 29151C3EC48A0EB9

View File

@ -42,13 +42,11 @@ func resizedFromOriginal(ctx context.Context, a *artwork, artID model.ArtworkID,
}
func (a *resizedArtworkReader) Key() string {
return fmt.Sprintf(
"%s.%d.%t.%d",
a.cacheKey,
a.size,
a.square,
conf.Server.CoverJpegQuality,
)
baseKey := fmt.Sprintf("%s.%d", a.cacheKey, a.size)
if a.square {
return baseKey + ".square"
}
return fmt.Sprintf("%s.%d", baseKey, conf.Server.CoverJpegQuality)
}
func (a *resizedArtworkReader) LastUpdated() time.Time {