icarus_models version bump #210

Merged
kdeng00 merged 15 commits from icarus_models-ver_bump into main 2025-10-20 11:19:06 -04:00
2 changed files with 10 additions and 7 deletions
Showing only changes of commit 7557537055 - Show all commits
+4 -2
View File
@@ -388,7 +388,7 @@ pub mod cov_db {
.try_get("song_id")
.map_err(|_e| sqlx::Error::RowNotFound)
.unwrap(),
..Default::default()
..Default::default()
}),
Err(_) => Err(sqlx::Error::RowNotFound),
}
@@ -718,7 +718,9 @@ pub mod endpoint {
let filename = format!("{}-coverart.jpeg", &song.filename[..8]);
let mut coverart =
icarus_models::coverart::init::init_coverart_dir_and_filename(&directory, &filename);
icarus_models::coverart::init::init_coverart_dir_and_filename(
&directory, &filename,
);
coverart.title = song.album.clone();
coverart.data = data;
+6 -5
View File
@@ -1498,12 +1498,13 @@ pub mod endpoint {
Ok(coverart) => {
// let coverart_path = std::path::Path::new(&coverart.path);
let coverart_path_str = match coverart.get_path() {
Ok(path) => {
path
}
Ok(path) => path,
Err(err) => {
response.message = err.to_string();
return (axum::http::StatusCode::INTERNAL_SERVER_ERROR, axum::Json(response));
return (
axum::http::StatusCode::INTERNAL_SERVER_ERROR,
axum::Json(response),
);
}
};
let coverart_path = std::path::Path::new(&coverart_path_str);
@@ -1522,7 +1523,7 @@ pub mod endpoint {
Ok(deleted_coverart) => {
match std::fs::remove_file(song_path) {
Ok(_) => match std::fs::remove_file(
&coverart_path
&coverart_path,
) {
Ok(_) => {
response.message = String::from(super::super::response::SUCCESSFUL);