Skip to content

Rework thumbnailing API

As a follow up from #23 (closed), #88 (closed) and #82 (closed), we need some changes to the thumbnailing API.

  • Add a thumbnail size type
  • Remove Thumbnail.origin field
  • Add per-entity thumbnail linking tables
  • Remove entities thumbnail_id fields
  • Use the media progress meta to compute the thumbnail, default to 15% (less than 30% to avoid spoilers :) )
  • Provide the position to generateThumbnail
  • Accept thumbnail generation request on a media which already has a thumbnail (and ensure this is properly documented)
  • Move thumbnail generations request from IMediaLibrary to IMedia
  • Add thumbnail size type, desired width & height parameters to IMedia::generateThumbnail
  • Add a thumbnail size type parameter to IMedia::isThumbnailGenerated
  • Ensure the resulting thumbnail respects the aspect ratio & is cropped to fit if necessary
  • Index linking tables thumbnail_id field
  • Automatically remove unused thumbnails (ie. a thumbnail_id which is never referenced from any linking table)

Cropping will most likely require a VLC core API change, since for now only scaling by respecting the aspect ratio appears to be supported by picture_Export

Edited by Hugo Beauzée-Luyssen
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information