Compare commits

...
2 Commits
Author SHA1 Message Date
phoenix 57eaf61254 Let it go
pr CI / Test Suite (pull_request) Failing after 3m34s
2026-08-14 16:13:34 -04:00
phoenix 2ec2e2471c sql fix 2026-08-14 16:13:15 -04:00
4 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ CREATE TABLE IF NOT EXISTS "song" (
date_created timestamptz DEFAULT now(), date_created timestamptz DEFAULT now(),
filename TEXT NOT NULL, filename TEXT NOT NULL,
directory TEXT NOT NULL, directory TEXT NOT NULL,
file_type TEXT NOT NULL, file_key TEXT NOT NULL,
user_id UUID NULL user_id UUID NULL
-- TODO: Add coverart id later. This will allow multiple songs to be linked to a single cover art -- TODO: Add coverart id later. This will allow multiple songs to be linked to a single cover art
); );
+7
View File
@@ -143,9 +143,13 @@ pub mod endpoint {
let lab_config = crate::util::maze::get_config(); let lab_config = crate::util::maze::get_config();
let lr = labyrinth::Labyrinth { config: lab_config }; let lr = labyrinth::Labyrinth { config: lab_config };
println!("Wut?");
match repo_queue::data::get_with_song_queue_id(&pool, &payload.song_queue_id).await { match repo_queue::data::get_with_song_queue_id(&pool, &payload.song_queue_id).await {
Ok((_id, file_key, _bucket, _region, _)) => match lr.download(&file_key).await { Ok((_id, file_key, _bucket, _region, _)) => match lr.download(&file_key).await {
Ok(data) => { Ok(data) => {
println!("Okay!");
println!("File key: {:?}", file_key);
song.data = data; song.data = data;
let dir = std::path::Path::new(&song.directory); let dir = std::path::Path::new(&song.directory);
if !dir.exists() { if !dir.exists() {
@@ -161,6 +165,7 @@ pub mod endpoint {
} }
song.file_key = format!("processed/song/{}", song.filename); song.file_key = format!("processed/song/{}", song.filename);
println!("Processed file key: {:?}", song.file_key);
let data_of_song = labyrinth::Data { let data_of_song = labyrinth::Data {
raw_data: song.data.clone(), raw_data: song.data.clone(),
..Default::default() ..Default::default()
@@ -177,12 +182,14 @@ pub mod endpoint {
(axum::http::StatusCode::OK, axum::Json(response)) (axum::http::StatusCode::OK, axum::Json(response))
} }
Err(err) => { Err(err) => {
eprintln!("Error inserting");
response.message = response.message =
format!("{:?} song {:?}", err.to_string(), song); format!("{:?} song {:?}", err.to_string(), song);
(axum::http::StatusCode::BAD_REQUEST, axum::Json(response)) (axum::http::StatusCode::BAD_REQUEST, axum::Json(response))
} }
}, },
Err(err) => { Err(err) => {
eprintln!("Error uploading");
eprintln!("Error: {err:?}"); eprintln!("Error: {err:?}");
( (
axum::http::StatusCode::INTERNAL_SERVER_ERROR, axum::http::StatusCode::INTERNAL_SERVER_ERROR,
-1
View File
@@ -1205,7 +1205,6 @@ mod tests {
match sequence_flow::queue_song_and_coverart_flow(&app).await { match sequence_flow::queue_song_and_coverart_flow(&app).await {
Ok((resp_one, song_queue_id)) => { Ok((resp_one, song_queue_id)) => {
assert!(false, "Got here 2");
let resp = util::get_resp_data::< let resp = util::get_resp_data::<
soaricarus_api::callers::queue::coverart::response::fetch_coverart_no_data::Response, soaricarus_api::callers::queue::coverart::response::fetch_coverart_no_data::Response,
>(resp_one) >(resp_one)
+1 -1
View File
@@ -61,7 +61,7 @@ CREATE TABLE IF NOT EXISTS "song" (
date_created timestamptz DEFAULT now(), date_created timestamptz DEFAULT now(),
filename TEXT NOT NULL, filename TEXT NOT NULL,
directory TEXT NOT NULL, directory TEXT NOT NULL,
file_type TEXT NOT NULL, file_key TEXT NOT NULL,
user_id UUID NULL user_id UUID NULL
); );