Link queued coverart to queued song #62
@@ -454,7 +454,10 @@ impl CommitManager {
|
|||||||
println!("Queued metadata Id: {queued_metadata_id:?}");
|
println!("Queued metadata Id: {queued_metadata_id:?}");
|
||||||
|
|
||||||
match up.queue_coverart(token, coverart).await {
|
match up.queue_coverart(token, coverart).await {
|
||||||
Ok(id) => match up.link_queued_song_to_queued_coverart(token, &queued_song_id, &id).await {
|
Ok(id) => match up
|
||||||
|
.link_queued_song_to_queued_coverart(token, &queued_song_id, &id)
|
||||||
|
.await
|
||||||
|
{
|
||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
println!("Queued coverart Id: {id:?}");
|
println!("Queued coverart Id: {id:?}");
|
||||||
println!("Linked queued song to queued coverart");
|
println!("Linked queued song to queued coverart");
|
||||||
@@ -462,7 +465,7 @@ impl CommitManager {
|
|||||||
Err(err) => {
|
Err(err) => {
|
||||||
return Err(std::io::Error::other(err.to_string()));
|
return Err(std::io::Error::other(err.to_string()));
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
return Err(std::io::Error::other(err.to_string()));
|
return Err(std::io::Error::other(err.to_string()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -268,7 +268,12 @@ impl Upload {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn link_queued_song_to_queued_coverart(&self, token: &icarus_models::token::AccessToken, queued_song_id: &uuid::Uuid, queued_coverart_id: &uuid::Uuid) -> Result<(), reqwest::Error> {
|
pub async fn link_queued_song_to_queued_coverart(
|
||||||
|
&self,
|
||||||
|
token: &icarus_models::token::AccessToken,
|
||||||
|
queued_song_id: &uuid::Uuid,
|
||||||
|
queued_coverart_id: &uuid::Uuid,
|
||||||
|
) -> Result<(), reqwest::Error> {
|
||||||
let endpoint = String::from("api/v2/coverart/queue/link");
|
let endpoint = String::from("api/v2/coverart/queue/link");
|
||||||
let url = format!("{}/{endpoint}", self.api.url);
|
let url = format!("{}/{endpoint}", self.api.url);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user