feat: do todos
This commit is contained in:
parent
fb14a6f9a0
commit
e5dd0206ca
4 changed files with 59 additions and 53 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use crate::Configuration;
|
||||
use crate::client::Client;
|
||||
use crate::client::ClientEvent;
|
||||
use crate::client::Note;
|
||||
|
|
@ -17,11 +18,12 @@ use tokio::sync::Mutex;
|
|||
|
||||
pub struct PlayCommand {
|
||||
midi_state: Arc<Mutex<MidiState>>,
|
||||
conf: Configuration,
|
||||
}
|
||||
|
||||
impl PlayCommand {
|
||||
pub fn new(midi_state: Arc<Mutex<MidiState>>) -> Self {
|
||||
Self { midi_state }
|
||||
pub fn new(midi_state: Arc<Mutex<MidiState>>, conf: Configuration) -> Self {
|
||||
Self { midi_state, conf }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -180,7 +182,7 @@ impl Command for PlayCommand {
|
|||
filename_to_play = format!("midis/{}.mid", hashed);
|
||||
filename_beautiful = first_capture.to_string();
|
||||
|
||||
let url = format!("https://files.sad.ovh/public/midis/{}", first_capture);
|
||||
let url = format!("{}/{}", self.conf.commands.copyparty, first_capture);
|
||||
|
||||
let file_exists = tokio::fs::try_exists(&filename_to_play)
|
||||
.await
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue