aboutsummaryrefslogtreecommitdiff
path: root/import/src/acoustid.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-09-25 04:00:51 +0200
committermetamuffin <metamuffin@disroot.org>2025-09-25 04:00:51 +0200
commitf8d4c438d10450ead56c0082b037e466ef5f9f24 (patch)
tree703612747f06b91f063dcd9e8a778675e6aa1303 /import/src/acoustid.rs
parent0fe48987c336b9b50cba09355aa3c1cf11740edc (diff)
downloadjellything-f8d4c438d10450ead56c0082b037e466ef5f9f24.tar
jellything-f8d4c438d10450ead56c0082b037e466ef5f9f24.tar.bz2
jellything-f8d4c438d10450ead56c0082b037e466ef5f9f24.tar.zst
start media processing refactor
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>,