icarus_envy version bump (#48)
Reviewed-on: #48 Co-authored-by: phoenix <kundeng00@pm.me> Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
6
Cargo.lock
generated
6
Cargo.lock
generated
@@ -516,8 +516,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "icarus_envy"
|
name = "icarus_envy"
|
||||||
version = "0.3.2"
|
version = "0.4.1"
|
||||||
source = "git+ssh://git@git.kundeng.us/phoenix/icarus_envy.git?tag=v0.3.2#d84a8144aedf02e1b459d67c4023a7e0833f89fd"
|
source = "git+ssh://git@git.kundeng.us/phoenix/icarus_envy.git?tag=v0.4.1-main-8f0d123db5-006#8f0d123db51b18e9cc4ab5bd39a474ba99bd39c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"const_format",
|
"const_format",
|
||||||
"dotenvy",
|
"dotenvy",
|
||||||
@@ -1320,7 +1320,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "songparser"
|
name = "songparser"
|
||||||
version = "0.3.0"
|
version = "0.3.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"icarus_envy",
|
"icarus_envy",
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "songparser"
|
name = "songparser"
|
||||||
version = "0.3.0"
|
version = "0.3.1"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
rust-version = "1.88"
|
rust-version = "1.88"
|
||||||
|
|
||||||
@@ -15,4 +15,4 @@ uuid = { version = "1.17.0", features = ["v4", "serde"] }
|
|||||||
rand = { version = "0.9.1" }
|
rand = { version = "0.9.1" }
|
||||||
icarus_meta = { git = "ssh://git@git.kundeng.us/phoenix/icarus_meta.git", tag = "v0.3.0" }
|
icarus_meta = { git = "ssh://git@git.kundeng.us/phoenix/icarus_meta.git", tag = "v0.3.0" }
|
||||||
icarus_models = { git = "ssh://git@git.kundeng.us/phoenix/icarus_models.git", tag = "v0.5.6" }
|
icarus_models = { git = "ssh://git@git.kundeng.us/phoenix/icarus_models.git", tag = "v0.5.6" }
|
||||||
icarus_envy = { git = "ssh://git@git.kundeng.us/phoenix/icarus_envy.git", tag = "v0.3.2" }
|
icarus_envy = { git = "ssh://git@git.kundeng.us/phoenix/icarus_envy.git", tag = "v0.4.1-main-8f0d123db5-006" }
|
||||||
|
14
src/main.rs
14
src/main.rs
@@ -12,8 +12,12 @@ pub const SECONDS_TO_SLEEP: u64 = 5;
|
|||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
let mut app = config::App {
|
let mut app = config::App {
|
||||||
uri: icarus_envy::environment::get_icarus_base_api_url().await,
|
uri: icarus_envy::environment::get_icarus_base_api_url()
|
||||||
auth_uri: icarus_envy::environment::get_icarus_auth_base_api_url().await,
|
.await
|
||||||
|
.value,
|
||||||
|
auth_uri: icarus_envy::environment::get_icarus_auth_base_api_url()
|
||||||
|
.await
|
||||||
|
.value,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
println!("Base URL: {:?}", app.uri);
|
println!("Base URL: {:?}", app.uri);
|
||||||
@@ -110,7 +114,7 @@ mod auth {
|
|||||||
let api_url = format!("{}/{endpoint}", app.auth_uri);
|
let api_url = format!("{}/{endpoint}", app.auth_uri);
|
||||||
|
|
||||||
let payload = serde_json::json!({
|
let payload = serde_json::json!({
|
||||||
"passphrase": icarus_envy::environment::get_service_passphrase().await,
|
"passphrase": icarus_envy::environment::get_service_passphrase().await.value,
|
||||||
});
|
});
|
||||||
|
|
||||||
match client.post(api_url).json(&payload).send().await {
|
match client.post(api_url).json(&payload).send().await {
|
||||||
@@ -415,7 +419,7 @@ pub async fn generate_song_queue_dir_and_filename() -> (String, String) {
|
|||||||
let mut song = icarus_models::song::Song::default();
|
let mut song = icarus_models::song::Song::default();
|
||||||
song.filename = song.generate_filename(icarus_models::types::MusicTypes::FlacExtension, true);
|
song.filename = song.generate_filename(icarus_models::types::MusicTypes::FlacExtension, true);
|
||||||
|
|
||||||
song.directory = icarus_envy::environment::get_root_directory().await;
|
song.directory = icarus_envy::environment::get_root_directory().await.value;
|
||||||
|
|
||||||
(song.directory, song.filename)
|
(song.directory, song.filename)
|
||||||
}
|
}
|
||||||
@@ -444,7 +448,7 @@ pub async fn generate_coverart_queue_dir_and_filename() -> (String, String) {
|
|||||||
filename += ".jpeg";
|
filename += ".jpeg";
|
||||||
|
|
||||||
// TODO: Consider separating song and coverart when saving to the filesystem
|
// TODO: Consider separating song and coverart when saving to the filesystem
|
||||||
let directory = icarus_envy::environment::get_root_directory().await;
|
let directory = icarus_envy::environment::get_root_directory().await.value;
|
||||||
|
|
||||||
(directory, filename)
|
(directory, filename)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user