feat: implement media metadata management with EXIF and TrackInfo support

This commit is contained in:
2025-11-14 07:41:54 +01:00
parent ea95c2255f
commit 55cf4db2de
18 changed files with 343 additions and 195 deletions

View File

@@ -10,6 +10,14 @@ pub enum PostgresRole {
Admin,
}
#[derive(Debug, Clone, PartialEq, Eq, sqlx::Type)]
#[sqlx(rename_all = "lowercase")]
#[sqlx(type_name = "TEXT")]
pub enum PostgresMediaMetadataSource {
Exif,
TrackInfo,
}
#[derive(sqlx::FromRow)]
pub struct PostgresUser {
@@ -51,6 +59,15 @@ pub struct PostgresMedia {
pub thumbnail_path: Option<String>,
}
#[derive(sqlx::FromRow)]
pub struct PostgresMediaMetadata {
pub id: uuid::Uuid,
pub media_id: uuid::Uuid,
pub source: String,
pub tag_name: String,
pub tag_value: String,
}
#[derive(Debug, Clone, Copy, sqlx::Type, PartialEq, Eq, Deserialize)]
#[sqlx(rename_all = "lowercase")]
#[sqlx(type_name = "album_permission")]