Skip to main content

## Module thumbnails

Source
Expand description

Thumbnail cache and image-URL commands.

TRACES: UR-007 | JA-028 | DR-016

## Structs§

GetImageRequest
  Request to get an image URL (with caching)

## Statics§

IMAGE_DOWNLOAD_SEMAPHORE 🔒
  Limit concurrent image downloads to avoid saturating the connection pool. Without this, rendering a page with hundreds of album cards fires hundreds of concurrent HTTP requests, starving API calls and causing timeouts.

## Functions§

image_get_url
  Get image as base64 data URL, caching if not already cached This extends the thumbnail system to serve all images through Rust with automatic caching
image_semaphore 🔒
mime_from_ext 🔒
thumbnail_clear_cache
  Clear all cached thumbnails
thumbnail_delete_item
  Delete cached thumbnails for a specific item
thumbnail_get_cached
  Get cached thumbnail path, returns None if not cached Also updates last_accessed timestamp for LRU tracking
thumbnail_get_stats
  Get thumbnail cache statistics
thumbnail_save
  Download and save a thumbnail to cache Returns the local file path on success
thumbnail_set_limit
  Set thumbnail cache storage limit in bytes