summaryrefslogtreecommitdiffstats
path: root/src/cmd/sync.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2018-11-08 02:23:16 -0500
committerJesse Luehrs <doy@tozt.net>2018-11-08 02:23:16 -0500
commit6d4abd89b2dfcdce0bd59d627a31e92fcc745c94 (patch)
tree891ce011366d9d6bec6fd9adfa56452715e0b212 /src/cmd/sync.rs
parentbd7c31233de96d96e16f9c15e22d014514f7a173 (diff)
downloadlastfm-query-6d4abd89b2dfcdce0bd59d627a31e92fcc745c94.tar.gz
lastfm-query-6d4abd89b2dfcdce0bd59d627a31e92fcc745c94.zip
better options handling
Diffstat (limited to 'src/cmd/sync.rs')
-rw-r--r--src/cmd/sync.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/cmd/sync.rs b/src/cmd/sync.rs
index 9dfb11f..3f80202 100644
--- a/src/cmd/sync.rs
+++ b/src/cmd/sync.rs
@@ -1,13 +1,10 @@
-use cli;
use db;
use lastfm;
use paths;
-pub fn run(opts: &cli::Options) -> failure::Fallible<()> {
+pub fn run(username: &str) -> failure::Fallible<()> {
let db = db::DB::new(&paths::db_path()?)?;
- let lastfm = lastfm::LastFMClient::new(
- opts.username.as_ref().unwrap()
- )?;
+ let lastfm = lastfm::LastFMClient::new(username)?;
let from = db.most_recent_timestamp()?.map(|x| x + 1);
let to_fetch = lastfm.track_count(from)?;