aboutsummaryrefslogtreecommitdiff
path: root/import/src/acoustid.rs
diff options
context:
space:
mode:
Diffstat (limited to 'import/src/acoustid.rs')
-rw-r--r--import/src/acoustid.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/import/src/acoustid.rs b/import/src/acoustid.rs
index 741d491..cbdfc7a 100644
--- a/import/src/acoustid.rs
+++ b/import/src/acoustid.rs
@@ -12,7 +12,7 @@ use reqwest::{
header::{HeaderMap, HeaderName, HeaderValue},
Client, ClientBuilder,
};
-use serde::Deserialize;
+use serde::{Deserialize, Serialize};
use std::{path::Path, process::Stdio, sync::Arc, time::Duration};
use tokio::{
io::AsyncReadExt,
@@ -27,30 +27,30 @@ pub(crate) struct AcoustID {
rate_limit: Arc<Semaphore>,
}
-#[derive(Debug, Hash, Clone, Encode, Decode)]
+#[derive(Debug, Hash, Clone, Serialize, Deserialize)]
pub(crate) struct Fingerprint {
duration: u32,
fingerprint: String,
}
-#[derive(Debug, Deserialize)]
+#[derive(Debug, Serialize, Deserialize)]
pub(crate) struct FpCalcOutput {
duration: f32,
fingerprint: String,
}
-#[derive(Deserialize, Encode, Decode)]
+#[derive(Serialize, Deserialize, Encode, Decode)]
pub(crate) struct AcoustIDLookupResultRecording {
id: String,
}
-#[derive(Deserialize, Encode, Decode)]
+#[derive(Serialize, Deserialize, Encode, Decode)]
pub(crate) struct AcoustIDLookupResult {
id: String,
score: f32,
#[serde(default)]
recordings: Vec<AcoustIDLookupResultRecording>,
}
-#[derive(Deserialize, Encode, Decode)]
+#[derive(Serialize, Deserialize, Encode, Decode)]
pub(crate) struct AcoustIDLookupResponse {
status: String,
results: Vec<AcoustIDLookupResult>,