diff --git a/music-player/server/src/bin/listdevices.rs b/music-player/server/src/bin/listdevices.rs deleted file mode 100644 index fc03529..0000000 --- a/music-player/server/src/bin/listdevices.rs +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2023, Savanni D'Gerinel - -This file is part of the Luminescent Dreams Tools. - -Luminescent Dreams Tools is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - -Luminescent Dreams Tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with Lumeto. If not, see . -*/ - -use dbus::ffidisp::Connection; -use music_player::audio::list_devices; - -fn main() { - for device in list_devices(Connection::new_session().unwrap()).unwrap() { - println!("Device: [{}] {}", device.address, device.name); - } -} diff --git a/music-player/server/src/bin/playertest.rs b/music-player/server/src/bin/playertest.rs deleted file mode 100644 index b163ec7..0000000 --- a/music-player/server/src/bin/playertest.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright 2023, Savanni D'Gerinel - -This file is part of the Luminescent Dreams Tools. - -Luminescent Dreams Tools is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - -Luminescent Dreams Tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with Lumeto. If not, see . -*/ - -use dbus::ffidisp::Connection; -use music_player::audio::{Message, MprisDevice}; -use std::{env, io, thread}; - -fn main() { - let device_address = env::var("DEVICE").unwrap(); - - let (tx, rx) = std::sync::mpsc::channel(); - let app_thread = thread::spawn(move || { - let mut device = MprisDevice::new(device_address).unwrap(); - device.monitor(rx); - }); - - let stdin = io::stdin(); - let mut input = String::new(); - let _ = stdin.read_line(&mut input); - let _ = tx.send(Message::Quit); - - let _ = app_thread.join(); -} diff --git a/music-player/server/src/bin/scan.rs b/music-player/server/src/bin/scan.rs deleted file mode 100644 index 31a2e59..0000000 --- a/music-player/server/src/bin/scan.rs +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2023, Savanni D'Gerinel - -This file is part of the Luminescent Dreams Tools. - -Luminescent Dreams Tools is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - -Luminescent Dreams Tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with Lumeto. If not, see . -*/ - -use dbus::ffidisp::Connection; -use music_player::audio::{Message, MprisDevice}; -use std::{env, io, thread}; - -fn main() { - let device_address = env::var("DEVICE").unwrap(); - let connection = Connection::new_session().unwrap(); - let player = mpris::Player::new(connection, device_address, 1000).unwrap(); - player. -} diff --git a/music-player/server/src/main.rs b/music-player/server/src/bin/server.rs similarity index 100% rename from music-player/server/src/main.rs rename to music-player/server/src/bin/server.rs diff --git a/music-player/server/src/bin/startplayer.rs b/music-player/server/src/bin/startplayer.rs deleted file mode 100644 index 4d09e24..0000000 --- a/music-player/server/src/bin/startplayer.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2023, Savanni D'Gerinel - -This file is part of the Luminescent Dreams Tools. - -Luminescent Dreams Tools is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - -Luminescent Dreams Tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with Lumeto. If not, see . -*/ - -use dbus::ffidisp::Connection; -use music_player::audio::{AudioPlayer, MprisDevice}; -use std::env; - -fn main() { - let device_address = env::var("DEVICE").unwrap(); - let args = env::args(); - let track = args.skip(1).next(); - let device = MprisDevice::new(device_address).unwrap(); - println!("Track: {:?}", track); - match track { - Some(track_id) => device.play(track_id), - None => device.play_pause(), - } - .expect("play to start"); -}