feat: implement media processing plugins and update repository structure
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user