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