From bd7c31233de96d96e16f9c15e22d014514f7a173 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 8 Nov 2018 01:52:31 -0500 Subject: stop passing the api key on the command line --- src/cmd/sync.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/cmd/sync.rs') diff --git a/src/cmd/sync.rs b/src/cmd/sync.rs index 65b48b7..9dfb11f 100644 --- a/src/cmd/sync.rs +++ b/src/cmd/sync.rs @@ -4,11 +4,10 @@ use lastfm; use paths; pub fn run(opts: &cli::Options) -> failure::Fallible<()> { - let db = db::DB::new(&paths::dbpath()?)?; + let db = db::DB::new(&paths::db_path()?)?; let lastfm = lastfm::LastFMClient::new( - opts.api_key.as_ref().unwrap(), opts.username.as_ref().unwrap() - ); + )?; let from = db.most_recent_timestamp()?.map(|x| x + 1); let to_fetch = lastfm.track_count(from)?; -- cgit v1.2.3-54-g00ecf