Repository navigation
Show large covers in the Library widgets - #1650
Conversation
Recently Played showed a placeholder for any cover over WidgetKit's 718,080-pixel limit, and Last Played decoded the whole cover before shrinking it, which runs a widget extension out of memory on a large one. Both now build an ImageIO thumbnail straight from the cached file at the size they draw it, so the full cover is never decoded and every image is far under the limit.
✅ Claude PR Review —
|
Problem
Large covers break the Library widgets:
Changes
WidgetUtils.getArtworkImage(for:length:scale:theme:)decodes the cached cover straight to the size the widget draws it, with ImageIO's thumbnail API (CGImageSourceCreateThumbnailAtIndex). The full cover is never decoded: memory follows the widget's size, not the original's, and every result is far under WidgetKit's pixel limit. It still falls back to the default artwork.isValidSizeandresizedForWidgetare gone: nothing is over the limit anymore.Testing