feat: Add thumbnail generation feature and update media model

- Updated workspace members to include `libertas_importer`.
- Added a new migration to add `thumbnail_path` column to `media` table.
- Enhanced configuration structures to include `thumbnail_config`.
- Modified `Media` model to include `thumbnail_path`.
- Updated `MediaRepository` trait and its implementation to handle thumbnail path updates.
- Created `ThumbnailPlugin` for generating thumbnails based on media configurations.
- Integrated thumbnail generation into the media processing workflow.
- Updated dependencies in `libertas_worker` and `libertas_importer` for image processing.
This commit is contained in:
2025-11-12 00:28:12 +01:00
parent 4f7b93a8b0
commit 60860cf508
22 changed files with 1259 additions and 22 deletions

View File

@@ -12,7 +12,7 @@ pub trait MediaRepository: Send + Sync {
async fn create(&self, media: &Media) -> CoreResult<()>;
async fn find_by_id(&self, id: Uuid) -> CoreResult<Option<Media>>;
async fn list_by_user(&self, user_id: Uuid, options: &ListMediaOptions) -> CoreResult<Vec<Media>>;
async fn update_metadata(
async fn update_exif_data(
&self,
id: Uuid,
width: Option<i32>,
@@ -20,6 +20,7 @@ pub trait MediaRepository: Send + Sync {
location: Option<String>,
date_taken: Option<chrono::DateTime<chrono::Utc>>,
) -> CoreResult<()>;
async fn update_thumbnail_path(&self, id: Uuid, thumbnail_path: String) -> CoreResult<()>;
async fn delete(&self, id: Uuid) -> CoreResult<()>;
}