tbd search results
This commit is contained in:
parent
25f082ee6f
commit
cdff5c0e48
3 changed files with 27 additions and 1 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -2651,6 +2651,7 @@ dependencies = [
|
||||||
"form_urlencoded",
|
"form_urlencoded",
|
||||||
"idna",
|
"idna",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
@ -24,7 +24,7 @@ serde = { version = "1.0.214", features = ["derive"] }
|
||||||
tokio = { version = "1", features = ["rt-multi-thread"] }
|
tokio = { version = "1", features = ["rt-multi-thread"] }
|
||||||
tracing = { version = "0.1.40", default-features = false, features = ["attributes", "std"] }
|
tracing = { version = "0.1.40", default-features = false, features = ["attributes", "std"] }
|
||||||
tracing-subscriber = "0.3.18"
|
tracing-subscriber = "0.3.18"
|
||||||
url = "2.5.2"
|
url = { version = "2.5.2", features = ["serde"] }
|
||||||
zbus = { version = "5.0.1", features = ["chrono"] }
|
zbus = { version = "5.0.1", features = ["chrono"] }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
use chrono::{offset::Utc, DateTime};
|
use chrono::{offset::Utc, DateTime};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
use url::Url;
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
#[serde(rename_all = "kebab-case")]
|
#[serde(rename_all = "kebab-case")]
|
||||||
|
@ -82,3 +83,27 @@ pub struct AlbumID3 {
|
||||||
pub played: Option<DateTime<Utc>>,
|
pub played: Option<DateTime<Utc>>,
|
||||||
// TODO: opensubsonic extensions?
|
// TODO: opensubsonic extensions?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct SearchResults3Outer {
|
||||||
|
pub search_results3: SearchResults3,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
pub struct SearchResults3 {
|
||||||
|
pub artist: Option<Vec<ArtistID3>>,
|
||||||
|
pub album: Option<Vec<AlbumID3>>,
|
||||||
|
pub song: Option<Vec<Child>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct ArtistID3 {
|
||||||
|
pub id: String,
|
||||||
|
pub name: String,
|
||||||
|
pub cover_art: Option<String>,
|
||||||
|
pub artist_image_url: Option<Url>,
|
||||||
|
pub album_count: Option<u32>,
|
||||||
|
pub starred: Option<DateTime<Utc>>,
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue