From 488c20202320e5eab9e147d994b22b9d0905fe74 Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Thu, 12 Jun 2025 14:38:48 -0400 Subject: [PATCH] Using constant and adding print statement --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 205f1dd..88d42eb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,6 @@ use std::io::Write; +pub const SECONDS_TO_SLEEP: u64 = 5; #[tokio::main] async fn main() -> Result<(), Box> { @@ -18,6 +19,7 @@ async fn main() -> Result<(), Box> { 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> { 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> { } println!("Sleeping"); - tokio::time::sleep(tokio::time::Duration::from_secs(5)).await; + tokio::time::sleep(tokio::time::Duration::from_secs(SECONDS_TO_SLEEP)).await; } }