Remove unused file

was previously used for notes during prototype phase
This commit is contained in:
GHOSCHT 2024-03-13 23:19:30 +01:00
parent 44cc3f4bdf
commit fadd962e8a
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82

View file

@ -1,46 +0,0 @@
fn list_all() {
PlayerFinder::new()
.expect("Could not connect to D-Bus")
.find_all()
.unwrap_or_else(|_| Vec::new())
.into_iter()
.map(|player| player.identity().to_string())
.unique()
.for_each(|player| println!("{}", player));
}
fn get_player(player_id: &str) -> Player {
PlayerFinder::new()
.expect("Could not connect to D-Bus")
.find_by_name(player_id)
.expect("Could not find any player")
}
fn increase_volume(player_id: &str, steps: f64) {
let player = get_player(player_id);
let volume = player.get_volume().expect("Could not get volume");
player.set_volume(volume + steps).expect("Could not pause");
}
fn decrease_volume(player_id: &str, steps: f64) {
increase_volume(player_id, -steps)
}
let filename = "foo.toml";
let contents = match fs::read_to_string(filename) {
Ok(c) => c,
Err(_) => {
eprintln!("Could not read file `{}`", filename);
std::process::exit(1);
}
};
//let config: Config = match toml::from_str(&contents) {
// Ok(c) => c,
// Err(_) => {
// eprintln!("Could not parse TOML");
// std::process::exit(1);
// }
//};