fetch song queue data #21

Merged
phoenix merged 9 commits from fetch_song_queue_data into devel 2025-06-12 18:57:03 +00:00
Showing only changes of commit 488c202023 - Show all commits

View File

@@ -1,5 +1,6 @@
use std::io::Write;
pub const SECONDS_TO_SLEEP: u64 = 5;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
@@ -18,6 +19,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
if !song_queue_item.data.is_empty() {
println!("Song queue item: {:?}", song_queue_item);
println!("Fetching song queue data");
match api::fetch_song_queue_data::get_data(
&app_base_url,
&song_queue_item.data[0].id,
@@ -33,7 +35,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("Saved at: {:?}", save_path);
// TODO: Get queued song's metadata
// TODO: Get queued coverart
// TODO: Get queued coverart's data
@@ -61,7 +62,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}
println!("Sleeping");
tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
tokio::time::sleep(tokio::time::Duration::from_secs(SECONDS_TO_SLEEP)).await;
}
}