Compare commits

..
13 Commits
Author SHA1 Message Date
phoenix 13015e0fe3 Changing
pr CI / Test Suite (pull_request) Failing after 4m35s
2026-08-15 11:36:31 -04:00
phoenix f3f6dcba94 Updated migrations 2026-08-15 11:35:46 -04:00
phoenix ed238dccab Do it 2026-08-15 11:35:27 -04:00
phoenix b04bbe2137 Changing file key of processed coverart
pr CI / Test Suite (pull_request) Successful in 4m10s
2026-08-15 11:18:13 -04:00
phoenix 12b3cd6ebc cargo update 2026-08-15 11:17:55 -04:00
phoenix 952755aaba bump: labyrinth 2026-08-15 11:08:04 -04:00
phoenix a3cef94108 bump: sienvy 2026-08-15 11:07:49 -04:00
phoenix b25fbc213d bump: simeta 2026-08-15 11:07:17 -04:00
phoenix 4dad8d2be4 bump: time 2026-08-15 11:06:55 -04:00
phoenix 4fbd8fc2bc bump: uuid 2026-08-15 11:06:26 -04:00
phoenix 430cb4ee60 bump: futures 2026-08-15 11:05:57 -04:00
phoenix d5c7fa6c2b bump: tokio-util 2026-08-15 11:04:49 -04:00
phoenix e98742fa95 bump: tokio 2026-08-15 11:04:20 -04:00
4 changed files with 3 additions and 53 deletions
Generated
+1 -1
View File
@@ -3013,7 +3013,7 @@ dependencies = [
[[package]] [[package]]
name = "soaricarus_api" name = "soaricarus_api"
version = "0.5.7" version = "0.5.6"
dependencies = [ dependencies = [
"axum", "axum",
"axum-extra", "axum-extra",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "soaricarus_api" name = "soaricarus_api"
version = "0.5.7" version = "0.5.6"
edition = "2024" edition = "2024"
rust-version = "1.95" rust-version = "1.95"
license = "MIT" license = "MIT"
+1 -4
View File
@@ -232,11 +232,8 @@ pub mod endpoint {
axum::Extension(pool): axum::Extension<sqlx::PgPool>, axum::Extension(pool): axum::Extension<sqlx::PgPool>,
axum::extract::Path(id): axum::extract::Path<uuid::Uuid>, axum::extract::Path(id): axum::extract::Path<uuid::Uuid>,
) -> (axum::http::StatusCode, axum::response::Response) { ) -> (axum::http::StatusCode, axum::response::Response) {
let lab_config = crate::util::maze::get_config();
let lr = labyrinth::Labyrinth { config: lab_config };
match repo::coverart::get_coverart(&pool, &id).await { match repo::coverart::get_coverart(&pool, &id).await {
Ok(coverart) => match lr.download(&coverart.file_key).await { Ok(coverart) => match simodels::coverart::io::to_data(&coverart) {
Ok(data) => { Ok(data) => {
let (file_type, img_type) = let (file_type, img_type) =
match simeta::detection::coverart::file_type_from_data(&data) { match simeta::detection::coverart::file_type_from_data(&data) {
-47
View File
@@ -503,19 +503,11 @@ mod tests {
pub const TEST_SONG_01_FILE_KEY: &str = "processed/song/track01.flac"; pub const TEST_SONG_01_FILE_KEY: &str = "processed/song/track01.flac";
pub const TEST_SONG_02_FILE_KEY: &str = "processed/song/track02.flac"; pub const TEST_SONG_02_FILE_KEY: &str = "processed/song/track02.flac";
pub const TEST_COVERART_01_FILE_KEY: &str = "processed/coverart/Coverart-1.jpg";
pub const TEST_COVERART_02_FILE_KEY: &str = "processed/coverart/Coverart-2.jpg";
pub struct SongBucket { pub struct SongBucket {
pub file_key: String, pub file_key: String,
pub path: String, pub path: String,
} }
pub struct CoverArtBucket {
pub file_key: String,
pub path: String,
}
pub async fn upload_test_songs_to_bucket() { pub async fn upload_test_songs_to_bucket() {
let songs = vec![ let songs = vec![
SongBucket { SongBucket {
@@ -554,44 +546,6 @@ mod tests {
} }
} }
pub async fn upload_test_coverarts_to_bucket() {
let coverarts = vec![
CoverArtBucket {
file_key: TEST_COVERART_01_FILE_KEY.to_string(),
path: "tests/I/Coverart-1.jpg".to_string(),
},
CoverArtBucket {
file_key: TEST_COVERART_02_FILE_KEY.to_string(),
path: "tests/I/Coverart-2.jpg".to_string(),
},
];
let lab_config = soaricarus_api::util::maze::get_config();
let lr = labyrinth::Labyrinth { config: lab_config };
for coverart in &coverarts {
let p = std::path::Path::new(&coverart.path);
match tokio::fs::File::open(p).await {
Ok(mut _file) => {
let data = labyrinth::Data {
filepath: coverart.path.clone(),
..Default::default()
};
match lr.upload(&coverart.file_key, &data).await {
Ok(_) => {}
Err(err) => {
assert!(false, "Error: {err:?}");
}
}
}
Err(err) => {
assert!(false, "Error: {err:?}");
}
};
}
}
pub async fn delete_test_songs_from_bucket() { pub async fn delete_test_songs_from_bucket() {
let songs = vec![ let songs = vec![
SongBucket { SongBucket {
@@ -679,7 +633,6 @@ mod tests {
app: &axum::Router, app: &axum::Router,
song_queue_id: &uuid::Uuid, song_queue_id: &uuid::Uuid,
) -> Result<axum::response::Response, axum::http::Error> { ) -> Result<axum::response::Response, axum::http::Error> {
upload_test_coverarts_to_bucket().await;
match super::request::upload_coverart_queue_req(&app).await { match super::request::upload_coverart_queue_req(&app).await {
Ok(response) => { Ok(response) => {
let resp = super::util::get_resp_data::< let resp = super::util::get_resp_data::<