From 2ae34c91a739c4963b52c22027a16a2aa34a9561 Mon Sep 17 00:00:00 2001 From: jakka Date: Thu, 19 Jun 2025 23:28:13 +0300 Subject: added file checking when opening db from file. added colors to cleaning information and total indexed files. higher fps for progress bars --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 1dd6f1b..9deb7c6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,6 +4,7 @@ mod flac; use anyhow::Result; use clap::{Arg, ArgAction, Command, ValueHint, command, value_parser}; use clap_complete::{Generator, Shell, generate}; +use console::style; use std::path::PathBuf; use tokio_util::sync::CancellationToken; @@ -101,7 +102,7 @@ fn main() -> Result<()> { if path.is_none() && !args.get_flag("clean") && !args.get_flag("doit") { let count = conn.get_toencode_number().await?; - println!("Files to reencode:\t{count}"); + println!("Files to reencode:\t{}", style(count).green()); return Ok(()); } @@ -115,7 +116,7 @@ fn main() -> Result<()> { } if args.get_flag("clean") { - conn.clean_files().await?; + files::clean_files(&conn).await?; } if canceltoken.is_cancelled() { -- cgit v1.3.1