big overhaul

This commit is contained in:
2023-05-09 13:41:54 +02:00
parent 3be9b6ccea
commit ecfbe8f147
7 changed files with 87 additions and 72 deletions

17
src/print_players.rs Normal file
View 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),
}
}