icarus_models version bump (#93)

* icarus_models version bump

* Build fix

* Removed method

* Some refactoring

* More cleanup

* Version bump

* Using standard version
This commit was merged in pull request #93.
This commit is contained in:
KD
2025-10-30 15:33:09 -04:00
committed by GitHub
parent abd16eeba2
commit 00615532ce
4 changed files with 35 additions and 51 deletions
+25 -34
View File
@@ -131,7 +131,7 @@ impl CommitManager {
}
fn map_actions(&self) -> HashMap<String, ActionValues> {
let actions: HashMap<String, ActionValues> = HashMap::from([
HashMap::from([
("download".to_string(), ActionValues::DownloadAct),
("download".to_string(), ActionValues::DownloadAct),
(
@@ -140,9 +140,7 @@ impl CommitManager {
),
("retrieve".to_string(), ActionValues::RetrieveAct),
("delete".to_string(), ActionValues::DeleteAct),
]);
actions
])
}
async fn delete_song(&self, token: &icarus_models::token::AccessToken) {
@@ -189,10 +187,17 @@ impl CommitManager {
song.data = o.as_bytes().to_vec();
song.directory = String::from(".");
song.filename = icarus_models::song::generate_filename(
icarus_models::types::MusicTypes::FlacExtension,
song.filename = match icarus_models::song::generate_filename(
icarus_models::types::MusicType::FlacExtension,
true,
);
) {
Ok(filename) => filename,
Err(err) => {
eprintln!("Error generating song filename: {err:?}");
utilities::checks::exit_program(-3);
return;
}
};
match song.save_to_filesystem() {
Ok(_) => {
println!("Song saved");
@@ -300,7 +305,7 @@ impl CommitManager {
} else if multitarget {
let _ = self.multi_target_upload(&uni, token).await;
} else {
println!("Single or Multi target has not been chosen");
eprintln!("Single or Multi target has not been chosen");
}
}
@@ -429,21 +434,14 @@ impl CommitManager {
println!("Queued coverart Id: {id:?}");
println!("Linked queued song to queued coverart");
println!("Queued status updated");
Ok(())
}
Err(err) => {
return Err(std::io::Error::other(err.to_string()));
}
Err(err) => Err(std::io::Error::other(err.to_string())),
},
Err(err) => {
return Err(std::io::Error::other(err.to_string()));
}
Err(err) => Err(std::io::Error::other(err.to_string())),
},
Err(err) => {
return Err(std::io::Error::other(err.to_string()));
}
Err(err) => Err(std::io::Error::other(err.to_string())),
}
Ok(())
}
fn get_songs(
@@ -486,7 +484,7 @@ impl CommitManager {
}
Ok(songs)
}
Err(_) => Ok(Vec::new()),
Err(_) => Err(std::io::Error::other("Songs not retrieved")),
}
}
@@ -531,7 +529,7 @@ impl CommitManager {
println!("Response: {o:?}");
}
Err(err) => {
println!("Error: {err:?}");
eprintln!("Error: {err:?}");
return Err(err);
}
}
@@ -540,12 +538,12 @@ impl CommitManager {
Ok(())
}
Err(err) => {
println!("Error: {err:?}");
eprintln!("Error: {err:?}");
Err(std::io::Error::other(err.to_string()))
}
},
Err(error) => {
println!("Error: {error:?}");
eprintln!("Error: {error:?}");
Err(std::io::Error::other(error.to_string()))
}
}
@@ -567,7 +565,9 @@ impl CommitManager {
}
}
Ok((String::new(), String::new()))
Err(std::io::Error::other(
"CoverArt directory and filename not found",
))
}
fn find_file_extension(&self, file_name: &std::ffi::OsString) -> En {
@@ -635,15 +635,6 @@ impl CommitManager {
}
}
Ok(String::new())
}
fn _check_for_no_confirm(&self) -> bool {
for flag in self.ica_action.flags.iter() {
if flag.flag == "-nc" {
return true;
}
}
false
Err(std::io::Error::other("Metadata path not found"))
}
}