This commit is contained in:
2026-03-11 00:21:56 +01:00
parent 816f8f75e7
commit 2f6f8414d0
13 changed files with 126 additions and 85 deletions
+13 -1
View File
@@ -5,6 +5,7 @@ use uuid::Uuid;
#[derive(Debug, Deserialize, Serialize)]
pub enum Jobs {
Search(SearchResponse),
Download(DownloadResponse),
Play(PlayResponse),
// Error(String),
@@ -13,7 +14,7 @@ pub enum Jobs {
pub type JobResult = Result<Jobs, String>;
#[derive(Serialize, Deserialize, Debug)]
pub struct JobResponse<T> {
pub struct JobResponse<T = Jobs> {
pub content: Option<T>,
pub error: Option<String>,
}
@@ -39,3 +40,14 @@ pub struct PlayJob {
#[derive(Serialize, Deserialize, Debug)]
pub struct PlayResponse {}
#[derive(Serialize, Deserialize, Debug)]
pub struct SearchJob {
pub uuid: Uuid,
pub query: String,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SearchResponse {
pub url: String,
}