7 Commits

Author SHA1 Message Date
Deluan
f9b0717086 refactor(artwork): move resizedItem next to the interface it implements
resizedItem is the only implementation of artworkReader, which is
declared in image_cache.go, and it is used by the worker's precache as
well as the serving path -- so worker.go was reaching into serving.go
for a cache type. representationTag stays in serving.go, where the
HTTP validator belongs.

Pure move.
2026-07-26 21:51:47 -04:00
Deluan
1bb1c7464e refactor(artwork): remove dead plumbing from the serving path
artworkReader.LastUpdated had no callers: invalidation rides entirely on
the cache key, so the interface member, the resizedItem field and its
four assignments were vestigial. Reader's second return value was
likewise discarded at all three call sites.

resizedItem.Key duplicated representationTag's format string over
identical inputs, where drift would serve a wrong-keyed entry under a
right-looking validator; it now derives from it. newResizedItem had one
caller and a doc comment claiming a sharing with worker.precache that
never existed -- precache builds its own literal.

Also unexport Prune, which no caller outside the package used while
RunPrune documented itself as the only sanctioned path, drop a
single-call placeholder wrapper, and delete five fakeFolderRepo fields
no spec ever set.
2026-07-26 20:25:48 -04:00
Deluan
937e58e5fb refactor(artwork): delete the legacy reader chain, cache warmer, and provider image methods 2026-07-23 14:08:08 -04:00
Deluan
806713719f Add lastUpdated to coverArt ids. Helps with invalidating art cache client-side. 2023-02-08 20:03:31 -05:00
Deluan
17eab6a88d Fix resized image cache key 2023-01-17 20:58:38 -05:00
Deluan
bedd2b2074 Implement better artwork cache keys 2023-01-17 20:37:10 -05:00
Deluan
8f3387a894 Fix tests and clean up code a bit 2022-12-28 15:31:56 -05:00