diff --git a/halloween_player/src/main.rs b/halloween_player/src/main.rs index 59e10c7..33b7c6f 100644 --- a/halloween_player/src/main.rs +++ b/halloween_player/src/main.rs @@ -129,7 +129,7 @@ async fn play_laugh() -> Result { } } -// Flexibler Endpunkt zum Abspielen beliebiger Dateien aus /home/pi/audio +// Flexibler Endpunkt zum Abspielen beliebiger Dateien aus /home/andilar/audio async fn play_custom(info: web::Query) -> Result { let filename = match &info.file { Some(f) => f, @@ -137,7 +137,7 @@ async fn play_custom(info: web::Query) -> Result { .body("Bitte Dateinamen angeben")), }; - let wav_path = format!("/home/pi/audio/{}", filename); + let wav_path = format!("/home/andilar/audio/{}", filename); if !std::path::Path::new(&wav_path).exists() { return Ok(HttpResponse::NotFound() @@ -158,9 +158,9 @@ async fn play_custom(info: web::Query) -> Result { } } -// Endpunkt zum Auflisten verfügbarer Halloween-Sounds aus /home/pi/audio +// Endpunkt zum Auflisten verfügbarer Halloween-Sounds aus /home/andilar/audio async fn list_sounds() -> Result { - let audio_dir = "/home/pi/audio"; + let audio_dir = "/home/andilar/audio"; match std::fs::read_dir(audio_dir) { Ok(entries) => { @@ -404,7 +404,7 @@ async fn index() -> Result { const list = document.getElementById('soundList'); if (sounds.length === 0) { - list.innerHTML = '
Keine externen WAV-Dateien in /home/pi/audio gefunden
'; + list.innerHTML = '
Keine externen WAV-Dateien in /home/andilar/audio gefunden
'; return; }