feat: implement media processing plugins and update repository structure

This commit is contained in:
2025-11-02 15:40:39 +01:00
parent a5a88c7f33
commit 4427428cf6
14 changed files with 232 additions and 291 deletions

View File

@@ -90,4 +90,29 @@ impl MediaRepository for PostgresMediaRepository {
.await
.map_err(|e| CoreError::Database(e.to_string()))
}
async fn update_metadata(
&self,
id: Uuid,
width: Option<i32>,
height: Option<i32>,
location: Option<String>,
) -> CoreResult<()> {
sqlx::query!(
r#"
UPDATE media
SET width = $2, height = $3, extracted_location = $4
WHERE id = $1
"#,
id,
width,
height,
location
)
.execute(&self.pool)
.await
.map_err(|e| CoreError::Database(e.to_string()))?;
Ok(())
}
}