big overhaul
This commit is contained in:
17
src/print_players.rs
Normal file
17
src/print_players.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
use mpris::PlayerFinder;
|
||||
|
||||
|
||||
pub fn print_players(pf: &PlayerFinder) {
|
||||
match pf.find_all() {
|
||||
Ok(players) => {
|
||||
if players.is_empty() {
|
||||
println!("No players found!");
|
||||
} else {
|
||||
for player in players {
|
||||
println!("{}", player.identity());
|
||||
}
|
||||
}
|
||||
},
|
||||
Err(e) => println!("{}", e),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user