use serde::Deserialize; #[derive(Debug, Deserialize)] #[serde(rename_all = "kebab-case")] pub struct SubsonicResponseOuter { pub subsonic_response: SubsonicResponse, } #[derive(Debug, Deserialize)] #[serde(rename_all = "kebab-case", tag = "status")] pub enum SubsonicResponse { Ok { #[serde(flatten)] inner: T, }, Failed { error: Error, }, } #[derive(Debug, Deserialize)] pub struct Error { pub code: u32, pub message: String, } #[derive(Debug, Deserialize)] #[serde(rename_all = "camelCase")] pub struct RandomSongsOuter { pub random_songs: RandomSongs, } #[derive(Debug, Deserialize)] pub struct RandomSongs { pub song: Vec, } #[derive(Debug, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Child { pub id: String, pub title: String, pub album: String, pub artist: String, pub track: u32, pub year: u32, pub starred: Option<()>, pub duration: u64, pub play_count: Option, pub genre: Option, pub cover_art: String, }