refactor: move print schedule to own function

This commit is contained in:
LinlyBoi
2025-07-10 13:02:58 +03:00
parent 549277c73d
commit 8bc17a3af3
2 changed files with 19 additions and 16 deletions

View File

@@ -158,3 +158,17 @@ pub fn expand_tilde(path: &str) -> String {
path.to_string()
}
}
pub fn print_schedule(video_files: &Vec<String>, schedule: &Vec<DateTime<Utc>>) {
// Display schedule
println!("Upload Schedule:");
println!("================");
for (i, (video_file, scheduled_time)) in video_files.iter().zip(schedule.iter()).enumerate() {
println!(
"{}. {} -> {}",
i + 1,
video_file,
scheduled_time.format("%Y-%m-%d %H:%M:%S UTC")
);
}
}