tsk-201: Cleanup

This commit is contained in:
kdeng00
2025-10-31 12:26:28 -04:00
parent 9f9abf4d9f
commit 877eda891b
+4 -3
View File
@@ -327,7 +327,7 @@ pub mod endpoint {
axum::http::header::CONTENT_TYPE, axum::http::header::CONTENT_TYPE,
file_type.mime.parse().unwrap(), file_type.mime.parse().unwrap(),
); );
// TODO: Make the conent disposition more dynamic
let coverart_type = if file_type.file_type let coverart_type = if file_type.file_type
== icarus_meta::detection::coverart::constants::JPEG_TYPE == icarus_meta::detection::coverart::constants::JPEG_TYPE
{ {
@@ -343,10 +343,11 @@ pub mod endpoint {
} else { } else {
return ( return (
axum::http::StatusCode::INTERNAL_SERVER_ERROR, axum::http::StatusCode::INTERNAL_SERVER_ERROR,
axum::response::Response::default() axum::response::Response::default(),
); );
}; };
let filename = icarus_models::coverart::generate_filename(coverart_type, true).unwrap(); let filename =
icarus_models::coverart::generate_filename(coverart_type, true).unwrap();
headers.insert( headers.insert(
axum::http::header::CONTENT_DISPOSITION, axum::http::header::CONTENT_DISPOSITION,
format!("attachment; filename=\"{filename}\"") format!("attachment; filename=\"{filename}\"")