Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions streamrip/media/artwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,19 @@ async def download_artwork(
assert saved_cover_path is not None
covers.set_largest_path(saved_cover_path)
if config.saved_max_width > 0:
downscale_image(saved_cover_path, config.saved_max_width)
# ⚡ Bolt: downscale_image does PIL file I/O and processing, wrap in to_thread
await asyncio.to_thread(
downscale_image, saved_cover_path, config.saved_max_width
)

if embed:
assert embed_cover_path is not None
covers.set_path(config.embed_size, embed_cover_path)
if config.embed_max_width > 0:
downscale_image(embed_cover_path, config.embed_max_width)
# ⚡ Bolt: downscale_image does PIL file I/O and processing, wrap in to_thread
await asyncio.to_thread(
downscale_image, embed_cover_path, config.embed_max_width
)

return embed_cover_path, saved_cover_path

Expand Down