Fixed the bug
This commit is contained in:
@@ -289,18 +289,20 @@ async fn some_work(
|
|||||||
.json::<the_rest::create_song::response::Response>()
|
.json::<the_rest::create_song::response::Response>()
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
Ok(mut resp) => {
|
Ok(resp) => {
|
||||||
println!("Response: {resp:?}");
|
println!("Response: {resp:?}");
|
||||||
|
|
||||||
let song = &mut resp.data[0];
|
let mut song = resp.data[0].clone();
|
||||||
song.directory = song_directory;
|
song.directory = song_directory;
|
||||||
song.filename = song_filename;
|
song.filename = song_filename;
|
||||||
|
|
||||||
match the_rest::create_coverart::create(app, &song.id, &coverart_queue_id).await {
|
match the_rest::create_coverart::create(app, &song.id, &coverart_queue_id).await {
|
||||||
Ok(response) => match response.json::<the_rest::create_coverart::response::Response>().await {
|
Ok(response) => match response.json::<the_rest::create_coverart::response::Response>().await {
|
||||||
Ok(resp) => {
|
Ok(resp) => {
|
||||||
println!("CoverArt sent and successfully parsed response");
|
println!("CoverArt sent and successfully parsed response");
|
||||||
println!("json: {resp:?}");
|
println!("json: {resp:?}");
|
||||||
let coverart = &resp.data[0];
|
let mut coverart = resp.data[0].clone();
|
||||||
|
coverart.path = coverart_queue_path.clone();
|
||||||
Ok((song.clone(), coverart.clone(), (metadata.song_queue_id, song_queue_path), (coverart_queue_id, coverart_queue_path)))
|
Ok((song.clone(), coverart.clone(), (metadata.song_queue_id, song_queue_path), (coverart_queue_id, coverart_queue_path)))
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
Reference in New Issue
Block a user