summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/db.rs2
-rw-r--r--src/main.rs4
2 files changed, 2 insertions, 4 deletions
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<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); })?;