Change resized image cache key

This commit is contained in:
Deluan 2024-06-08 13:37:30 -04:00
parent 3252fab171
commit e434ca9372
1 changed files with 5 additions and 7 deletions

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 {