_ => "unknown".to_string()
};
- println!("Playback State:\n{}", player_state);
+ info!("Playback State:\n{}", player_state);
let play_str = format!("{}\n{}\n{}", track, artist, album);
status.set_tooltip(&play_str);
status.add_label("");
status.add_label("Devices:");
status.add_separator();
- println!("Visible Devices:");
+ info!("Visible Devices:");
let devices: Vec<(String,String)> = device_list.into_iter().map(|d| {
(d.name.clone(), d.id.clone().unwrap_or(String::new()))
let mut cur_volume: u32 = 0;
let mut cur_volume_exact: u32 = 0;
for dev in device_list {
- println!("{}", dev);
+ info!("{}", dev);
let id = match dev.id {
Some(ref id) => id.clone(),
None => "".to_string(),
app.menu.device.push((item, id));
touchbar.update_volume(cur_volume_exact);
}
- println!("");
+ info!("");
status.add_label("");
status.add_label("Volume:");
{
let mut player_writer = player_state.write().unwrap();
let cmp = compare_playback_states(player_writer.as_ref(), play_state.as_ref());
- info!("State change: {:?}", cmp);
match cmp {
StateChange::Changed(time_ms) => {
track_play_time_ms += time_ms;
require(spotify.play(Some(&ctx)));
}
None => {
- println!("Transfer!");
+ info!("Transfer!");
require(spotify.play(None));
}
};