use serde::{Deserialize, Serialize}; /// Raw metadata extracted from audio file tags. #[derive(Debug, Default)] pub struct RawMetadata { pub title: Option, pub artist: Option, pub album: Option, pub track_number: Option, pub year: Option, pub genre: Option, pub duration_secs: Option, pub audio_bitrate: Option, pub audio_sample_rate: Option, pub audio_bit_depth: Option, } /// Hints parsed from the file path (directory structure + filename). #[derive(Debug, Default)] pub struct PathHints { pub title: Option, pub artist: Option, pub album: Option, pub year: Option, pub track_number: Option, } /// Normalized metadata returned by the LLM. #[derive(Debug, Default, Serialize, Deserialize)] pub struct NormalizedFields { pub title: Option, pub artist: Option, pub album: Option, pub year: Option, pub track_number: Option, pub genre: Option, #[serde(default)] pub featured_artists: Vec, pub release_type: Option, pub confidence: Option, pub notes: Option, } /// A similar artist found via pg_trgm fuzzy search. #[derive(Debug, Clone)] #[allow(dead_code)] pub struct SimilarArtist { pub id: i64, pub name: String, pub similarity: f32, } /// A similar release found via pg_trgm fuzzy search. #[derive(Debug, Clone)] #[allow(dead_code)] pub struct SimilarRelease { pub id: i64, pub title: String, pub year: Option, pub similarity: f32, } /// Context about other files in the same folder (for the LLM). pub struct FolderContext { pub folder_path: String, pub folder_files: Vec, pub track_count: usize, }