Code formatting
This commit is contained in:
@@ -458,7 +458,10 @@ impl CommitManager {
|
|||||||
.link_queued_song_to_queued_coverart(token, &queued_song_id, &id)
|
.link_queued_song_to_queued_coverart(token, &queued_song_id, &id)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
Ok(_) => match up.update_queued_song_status(token, &queued_song_id, "ready").await {
|
Ok(_) => match up
|
||||||
|
.update_queued_song_status(token, &queued_song_id, "ready")
|
||||||
|
.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");
|
||||||
@@ -467,7 +470,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()));
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-8
@@ -300,7 +300,12 @@ impl Upload {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn update_queued_song_status(&self, token: &icarus_models::token::AccessToken, queued_song_id: &uuid::Uuid, status: &str) -> Result<(), reqwest::Error> {
|
pub async fn update_queued_song_status(
|
||||||
|
&self,
|
||||||
|
token: &icarus_models::token::AccessToken,
|
||||||
|
queued_song_id: &uuid::Uuid,
|
||||||
|
status: &str,
|
||||||
|
) -> Result<(), reqwest::Error> {
|
||||||
let endpoint = String::from("api/v2/song/queue");
|
let endpoint = String::from("api/v2/song/queue");
|
||||||
let url = format!("{}/{endpoint}", self.api.url);
|
let url = format!("{}/{endpoint}", self.api.url);
|
||||||
|
|
||||||
@@ -315,13 +320,15 @@ impl Upload {
|
|||||||
|
|
||||||
let client = reqwest::Client::builder().build().unwrap();
|
let client = reqwest::Client::builder().build().unwrap();
|
||||||
|
|
||||||
match client.patch(url).headers(headers).json(&payload).send().await {
|
match client
|
||||||
Ok(_) => {
|
.patch(url)
|
||||||
Ok(())
|
.headers(headers)
|
||||||
}
|
.json(&payload)
|
||||||
Err(err) => {
|
.send()
|
||||||
Err(err)
|
.await
|
||||||
}
|
{
|
||||||
|
Ok(_) => Ok(()),
|
||||||
|
Err(err) => Err(err),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user