Skip to content

Commit

Permalink
Tidy up logging in scrobbler.rs & spirc.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
David Futcher committed Aug 26, 2017
1 parent 11f0144 commit 4ade0fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/scrobbler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ impl Scrobbler {
match self.current_track_start {
Some(start_time) => {
let play_time = start_time.elapsed();
info!("Current track play time: {:?}", play_time);

if play_time > Duration::new(20, 0) {
return true
Expand Down Expand Up @@ -195,7 +194,6 @@ impl Future for Scrobbler {
}

if self.can_scrobble_track() {
info!("Starting scrobble future");
self.scrobble_future = Some(self.send_scrobble());
}

Expand Down
7 changes: 3 additions & 4 deletions src/spirc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ impl Future for SpircTask {
Ok(Async::NotReady) => {

},
Err(_) => {
panic!("Scrobbler panic");
Err(err) => {
error!("Scrobbler error: {:?}", err);
}
}
}
Expand Down Expand Up @@ -462,11 +462,10 @@ impl SpircTask {
let playing_track_spotify_id = SpotifyId::from_raw(playing_track_ref.get_gid());

self.scrobbler.update_current_track(playing_track_spotify_id);
println!("Current track: {:?}", playing_track_spotify_id);
info!("Relevant SPIRC frame; Current track Spotify ID: {:?}", playing_track_spotify_id);
}
}
}

_ => (),
}
}
Expand Down

0 comments on commit 4ade0fc

Please sign in to comment.