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 { func (a *resizedArtworkReader) Key() string {
return fmt.Sprintf( baseKey := fmt.Sprintf("%s.%d", a.cacheKey, a.size)
"%s.%d.%t.%d", if a.square {
a.cacheKey, return baseKey + ".square"
a.size, }
a.square, return fmt.Sprintf("%s.%d", baseKey, conf.Server.CoverJpegQuality)
conf.Server.CoverJpegQuality,
)
} }
func (a *resizedArtworkReader) LastUpdated() time.Time { func (a *resizedArtworkReader) LastUpdated() time.Time {