fix(artwork): address PR review bot feedback

- don't record noResult for timed-out/cancelled computations (transient
  failures must not suppress retries for the same artwork version)
- bound the noResult negative cache at 25k entries
- use context.Background for the worker's root context
- add hash:"ignore" to Artist/Playlist blurhash fields for consistency
  with Album (inert today; neither struct is hashed)
This commit is contained in:
Deluan 2026-07-17 11:13:59 -04:00
commit 9ea4e22ea0
3 changed files with 16 additions and 6 deletions

View file

@ -42,8 +42,8 @@ type Artist struct {
CreatedAt *time.Time `structs:"created_at" json:"createdAt,omitempty"`
UpdatedAt *time.Time `structs:"updated_at" json:"updatedAt,omitempty"`
BlurHash string `structs:"blur_hash" json:"blurHash,omitempty"`
BlurHashUpdatedAt *time.Time `structs:"blur_hash_updated_at" json:"-"`
BlurHash string `structs:"blur_hash" json:"blurHash,omitempty" hash:"ignore"`
BlurHashUpdatedAt *time.Time `structs:"blur_hash_updated_at" json:"-" hash:"ignore"`
}
type ArtistStats struct {

View file

@ -31,8 +31,8 @@ type Playlist struct {
CreatedAt time.Time `structs:"created_at" json:"createdAt"`
UpdatedAt time.Time `structs:"updated_at" json:"updatedAt"`
BlurHash string `structs:"blur_hash" json:"blurHash,omitempty"`
BlurHashUpdatedAt *time.Time `structs:"blur_hash_updated_at" json:"-"`
BlurHash string `structs:"blur_hash" json:"blurHash,omitempty" hash:"ignore"`
BlurHashUpdatedAt *time.Time `structs:"blur_hash_updated_at" json:"-" hash:"ignore"`
// SmartPlaylist attributes
Rules *criteria.Criteria `structs:"rules" json:"rules"`