From 4f0fe4efb761670fac366122d1f724f54b075b76 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 7 Nov 2018 20:45:42 -0500 Subject: clean up output a bit --- src/db.rs | 2 +- src/main.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/db.rs b/src/db.rs index 67dec84..7289810 100644 --- a/src/db.rs +++ b/src/db.rs @@ -37,7 +37,7 @@ impl DB { fn create>( path: &P ) -> failure::Fallible { - println!( + eprintln!( "Initializing database at {}", path.as_ref().to_string_lossy(), ); diff --git a/src/main.rs b/src/main.rs index c104b23..55e1725 100644 --- a/src/main.rs +++ b/src/main.rs @@ -27,13 +27,11 @@ fn sync(opts: &cli::Options) -> failure::Fallible<()> { let exporter = exporter::Exporter::new(&db, &lastfm); let to_fetch = exporter.tracks_to_sync()?; - println!("need to download {} tracks", to_fetch); - let bar = indicatif::ProgressBar::new(to_fetch); bar.set_style( indicatif::ProgressStyle::default_bar() .progress_chars("=> ") - .template("{percent:>3}% [{wide_bar}] {eta:5}") + .template("Downloading {pos}/{len} tracks...\n{percent:>3}% [{wide_bar}] {eta:5}") ); exporter.sync(|_| { bar.inc(1); })?; -- cgit v1.2.3-54-g00ecf