diff options
author | Jesse Luehrs <doy@tozt.net> | 2018-11-08 01:52:31 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2018-11-08 01:52:31 -0500 |
commit | bd7c31233de96d96e16f9c15e22d014514f7a173 (patch) | |
tree | 10d1cc4bc6a88475e38e5b137928b3f74e6fdf35 /src/cmd/sync.rs | |
parent | de41e542cb74d192ffd48600569b7d9fdc9e6cdd (diff) | |
download | lastfm-query-bd7c31233de96d96e16f9c15e22d014514f7a173.tar.gz lastfm-query-bd7c31233de96d96e16f9c15e22d014514f7a173.zip |
stop passing the api key on the command line
Diffstat (limited to 'src/cmd/sync.rs')
-rw-r--r-- | src/cmd/sync.rs | 5 |
1 files changed, 2 insertions, 3 deletions
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)?; |