icarus_models version bump #229
Generated
+3
-3
@@ -964,7 +964,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "icarus"
|
||||
version = "0.3.12"
|
||||
version = "0.3.13"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"axum-extra",
|
||||
@@ -1016,8 +1016,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "icarus_models"
|
||||
version = "0.8.3"
|
||||
source = "git+ssh://git@git.kundeng.us/phoenix/icarus_models.git?tag=v0.8.3#0a27b8ccb1ac40361df8d3131f567f37f06cdc08"
|
||||
version = "0.9.2"
|
||||
source = "git+ssh://git@git.kundeng.us/phoenix/icarus_models.git?tag=v0.9.2#05525618514409101c1d6474dafb201386d14a30"
|
||||
dependencies = [
|
||||
"josekit",
|
||||
"rand 0.9.2",
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "icarus"
|
||||
version = "0.3.12"
|
||||
version = "0.3.13"
|
||||
edition = "2024"
|
||||
rust-version = "1.90"
|
||||
|
||||
@@ -26,7 +26,7 @@ josekit = { version = "0.10.3" }
|
||||
utoipa = { version = "5.4.0", features = ["axum_extras"] }
|
||||
utoipa-swagger-ui = { version = "9.0.2", features = ["axum"] }
|
||||
icarus_meta = { git = "ssh://git@git.kundeng.us/phoenix/icarus_meta.git", tag = "v0.4.3" }
|
||||
icarus_models = { git = "ssh://git@git.kundeng.us/phoenix/icarus_models.git", tag = "v0.8.3" }
|
||||
icarus_models = { git = "ssh://git@git.kundeng.us/phoenix/icarus_models.git", tag = "v0.9.2" }
|
||||
icarus_envy = { git = "ssh://git@git.kundeng.us/phoenix/icarus_envy.git", tag = "v0.5.0" }
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -185,18 +185,15 @@ pub mod endpoint {
|
||||
if file_type.file_type
|
||||
== icarus_meta::detection::coverart::constants::JPEG_TYPE
|
||||
{
|
||||
(
|
||||
file_type,
|
||||
icarus_models::types::CoverArtTypes::JpegExtension,
|
||||
)
|
||||
(file_type, icarus_models::types::CoverArtType::JpegExtension)
|
||||
} else if file_type.file_type
|
||||
== icarus_meta::detection::coverart::constants::JPG_TYPE
|
||||
{
|
||||
(file_type, icarus_models::types::CoverArtTypes::JpgExtension)
|
||||
(file_type, icarus_models::types::CoverArtType::JpgExtension)
|
||||
} else if file_type.file_type
|
||||
== icarus_meta::detection::coverart::constants::PNG_TYPE
|
||||
{
|
||||
(file_type, icarus_models::types::CoverArtTypes::PngExtension)
|
||||
(file_type, icarus_models::types::CoverArtType::PngExtension)
|
||||
} else {
|
||||
return (
|
||||
axum::http::StatusCode::INTERNAL_SERVER_ERROR,
|
||||
@@ -215,7 +212,8 @@ pub mod endpoint {
|
||||
let bytes = axum::body::Bytes::from(data);
|
||||
let mut response = bytes.into_response();
|
||||
let headers = response.headers_mut();
|
||||
let filename = icarus_models::coverart::generate_filename(img_type, true);
|
||||
let filename =
|
||||
icarus_models::coverart::generate_filename(img_type, true).unwrap();
|
||||
headers.insert(
|
||||
axum::http::header::CONTENT_TYPE,
|
||||
file_type.mime.parse().unwrap(),
|
||||
|
||||
+3
-2
@@ -135,9 +135,10 @@ pub mod endpoint {
|
||||
if payload.is_valid() {
|
||||
let mut song = payload.to_song();
|
||||
song.filename = icarus_models::song::generate_filename(
|
||||
icarus_models::types::MusicTypes::FlacExtension,
|
||||
icarus_models::types::MusicType::FlacExtension,
|
||||
true,
|
||||
);
|
||||
)
|
||||
.unwrap();
|
||||
song.directory = icarus_envy::environment::get_root_directory().await.value;
|
||||
|
||||
match repo_queue::song::get_data(&pool, &payload.song_queue_id).await {
|
||||
|
||||
+3
-3
@@ -575,7 +575,6 @@ mod tests {
|
||||
.body(axum::body::Body::from_stream(body))
|
||||
.unwrap();
|
||||
|
||||
// Send request
|
||||
app.clone().oneshot(req).await
|
||||
}
|
||||
|
||||
@@ -1132,9 +1131,10 @@ mod tests {
|
||||
let song = icarus_models::song::Song {
|
||||
directory: test_dir,
|
||||
filename: icarus_models::song::generate_filename(
|
||||
icarus_models::types::MusicTypes::FlacExtension,
|
||||
icarus_models::types::MusicType::FlacExtension,
|
||||
true,
|
||||
),
|
||||
)
|
||||
.unwrap(),
|
||||
data: bytes.to_vec(),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
@@ -115,6 +115,7 @@ pub async fn get_coverart_with_song_id(
|
||||
.try_get("song_id")
|
||||
.map_err(|_e| sqlx::Error::RowNotFound)
|
||||
.unwrap(),
|
||||
..Default::default()
|
||||
}),
|
||||
Err(_) => Err(sqlx::Error::RowNotFound),
|
||||
}
|
||||
@@ -161,6 +162,7 @@ pub async fn delete_coverart(
|
||||
.map_err(|_e| sqlx::Error::RowNotFound)
|
||||
.unwrap(),
|
||||
data: Vec::new(),
|
||||
..Default::default()
|
||||
}),
|
||||
Err(_err) => Err(sqlx::Error::RowNotFound),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user