diff options
author | Jesse Luehrs <doy@tozt.net> | 2018-11-07 20:45:42 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2018-11-07 20:45:42 -0500 |
commit | 4f0fe4efb761670fac366122d1f724f54b075b76 (patch) | |
tree | 01728f9ee8012f77911039f367a61dba92c9f725 | |
parent | 1b18401ad9acc6f2fe6625b5cbb9b2b8f162536a (diff) | |
download | lastfm-query-4f0fe4efb761670fac366122d1f724f54b075b76.tar.gz lastfm-query-4f0fe4efb761670fac366122d1f724f54b075b76.zip |
clean up output a bit
-rw-r--r-- | src/db.rs | 2 | ||||
-rw-r--r-- | src/main.rs | 4 |
2 files changed, 2 insertions, 4 deletions
@@ -37,7 +37,7 @@ impl DB { fn create<P: AsRef<std::path::Path>>( path: &P ) -> failure::Fallible<rusqlite::Connection> { - 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); })?; |