Got it working
This commit is contained in:
@@ -562,26 +562,41 @@ impl CommitManager {
|
||||
|
||||
match self.get_songs(&metadatapath, sourcepath) {
|
||||
Ok(sngs) => {
|
||||
for song in sngs {
|
||||
match Runtime::new()
|
||||
.unwrap()
|
||||
.block_on(up.upload_song_with_metadata(&token, &song, &cover_art))
|
||||
{
|
||||
Ok(o) => {
|
||||
println!("Response: {o:?}");
|
||||
match icarus_models::album::collection::parse_album(&metadatapath) {
|
||||
Ok(album) => {
|
||||
for song in sngs {
|
||||
let members = UploadSongMembers {
|
||||
song: song,
|
||||
coverart: cover_art.clone(),
|
||||
token: token.clone(),
|
||||
album: album.clone(),
|
||||
};
|
||||
|
||||
match self.upload_song_process(&members).await
|
||||
{
|
||||
Ok(o) => {
|
||||
println!("Response: {o:?}");
|
||||
}
|
||||
Err(err) => {
|
||||
println!("Error: {err:?}");
|
||||
return Err(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
println!("Error: {err:?}");
|
||||
}
|
||||
};
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Err(err) => {
|
||||
println!("Error: {err:?}");
|
||||
Err(std::io::Error::other(err.to_string()))
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(error) => {
|
||||
println!("Error: {error:?}");
|
||||
Err(std::io::Error::other(error.to_string()))
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn get_cover_art_path(&self, directory_path: &String) -> Result<String> {
|
||||
|
||||
Reference in New Issue
Block a user