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